Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fine tuning a SPROC
Message
From
21/06/2007 19:50:41
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01234693
Message ID:
01234896
Views:
20
>>UNION will filter the duplicate records, BUT you will never have ones, because of CAST('' AS char(50))
>>
>>
>>SELECT 1, 'abracadabra'
>>UNION
>>SELECT 1, ''
>>
>>will generate two records
>
>I see now, you're right. We do need a left join in the second portion with is null in where clause.

Ergo your original assertion is false, which is exactly what I figured.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform