Viewing 7 posts - 1 through 7 (of 7 total)
Yes, with Case, i.e. (the query of course depends on how to stick taba and tabb together):
SELECT
TabA....
CASE
WHEN TabA.code='A' THEN TabB.DataA
...
January 25, 2007 at 3:51 am
I would say that if the functionality is sufficient, then use the charindex.
If you do:
DECLARE @sum FLOAT, @s-2 VARCHAR(255)
SELECT @s-2 = 'foobar', @sum = 0.0
WHILE...
January 23, 2007 at 3:06 pm
January 23, 2007 at 3:03 pm
Ok - heres the biggie:
When I change all "LEFT JOIN" in "LEFT HASH JOIN" (only in my query, I don't touch the views) the whole query needs under one second...
January 23, 2007 at 2:58 pm
No, this table has only one record (accounting stuff: the client and the current year).
January 23, 2007 at 4:03 am
If it is not relevant in which order the phone numbers (home, ...) is preferred, left join this:
...
LEFT JOIN (
SELECT
customerid,
MAX(phonenumber)...
January 22, 2007 at 12:24 pm
January 22, 2007 at 11:24 am
Viewing 7 posts - 1 through 7 (of 7 total)