Viewing 15 posts - 901 through 915 (of 1,554 total)
imo you should avoid mixing collations unless there is no way you can avoid it. If you have mixed collations, but there is no real need for it, it's better...
September 12, 2005 at 12:27 am
In that case an option may be to nest derived tables. That way you only have to define the expression once, then you can refer to it's label in the...
September 9, 2005 at 7:47 am
You have to change the expressions from the lables to the expressions that evalutes to those labels..
Select
TYPE,
TYPE2,
ATTRIBUTE1,
LOCATION =
CASE
WHEN (TYPE = 'Switch' AND TYPE2 = 'out') THEN 'inwards reversal'
WHEN (TYPE =...
September 9, 2005 at 7:32 am
ummm maybe.. dunno.. was very long time ago. This 'magic pivot' has been around since 6.x days. I only remember that once there was an 'issue' when doing it, and...
September 9, 2005 at 7:25 am
I'd say that the easy answer is 'it depends'.
imo there is never going to happen that you can write a piece of generic code...
September 9, 2005 at 7:12 am
Ah... (had my coffee now) Something like this?
use northwind
select customerId,
'Customers' as 'origin'
from customers
union all
select customerId,
'Orders'
from orders
customerId origin
---------- ---------
ALFKI Customers
ANATR Customers
ANTON Customers
..................
ANATR Orders
ANATR Orders
ANTON ...
September 9, 2005 at 7:00 am
Nope, that was not it - that much I remember
Anyway, I just mentioned it as a 'standard disclaimer' - something to keep in...
September 9, 2005 at 6:53 am
In SQL Server 2005 we will have PIVOT.
I don't remember the specifics about when this trick didn't work, it had something to do with indexes, that much I know. But,...
September 9, 2005 at 6:49 am
Maybe not enough coffee, but I don't get it..
Can you explain what you're trying to do?
/Kenneth
September 9, 2005 at 6:14 am
So, are you saying that by making the user sysadmin, the problem is solved?
I would argue that that is not a solution at...
September 9, 2005 at 6:11 am
In this case, the function is the 'loop'.
The function just encapsulates the 'looping logic' needed to pivot the tradenames.
Though, be aware that (afaik) this 'pivot-trick' isn't supported, and if memory serves...
September 9, 2005 at 5:58 am
Ok, so then the problem is that sometimes the dbnames in 'old' and 'new' have different collations. Assuming you can't fix the root of the problem (making all collations the...
September 9, 2005 at 5:46 am
Here's an alternative way that may be easier to read, and also avoiding negations. Of course one has to look at the actual queryplans (and possibly i/o statistics) in order...
September 9, 2005 at 5:09 am
Starting to clear but still misty
Ok, so if we back off a little.. Can you post a part of the actual code that...
September 9, 2005 at 3:43 am
Not exactly your situation, but the info may give some pointers where to start looking. http://support.microsoft.com/default.aspx?scid=kb;EN-US;328569
/Kenneth
September 9, 2005 at 3:18 am
Viewing 15 posts - 901 through 915 (of 1,554 total)