June 8, 2005 at 9:25 am
Still doesn't work...
10JohnA
10John1A
Mack
Rock
40SilkB
MannC
You have one too many 10 and A, you also miss 20 and 30 in the ids.
June 8, 2005 at 10:14 am
UPS ya I was missing 20 and 30 ... didn't notice (Thks Remi : ) )
for the (10,a) pair I SAID the sol is not working... he needs to check the first name too...
Is his spec doesn't appear but I just wanted to point out that in that case is not working!
SELECT CASE WHEN cnt IS NULL THEN ltrim(str(A.IDRow))WHEN Cnt=1 THEN ltrim(str(A.IDRow)) ELSE '' END AS IDRow, A.FirstName, CASE WHEN B.IDRow IS NULL THEN '' ELSE A.Country END As Country
FROM #t A LEFT OUTER JOIN @MyTable1 B
ON A.IDRow=B.IDRow AND A.Country=B.Country
Vasc
June 8, 2005 at 10:17 am
The only "easy" way I see of doing this is at the client side. just takes 3 list and an IsInList function... not that hard to code and would probabely run must faster than what the server could do with sub selects.
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply