Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NULL value in results
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01323872
Message ID:
01323879
Views:
14
>>Select:
>>
>>
>>	QUOTENAME (ISNULL(InsCompanyID2,''),'"') AS InsCompanyID2,
>>
>>
>>The result for this column is NULL, I need it to be "".
>
>Use another SQL Server function ISNULL or COALESCE.


Why?
(BTW I like COALESCE() more because that function get higher type and convert everything to it) but ISNULL should work:
DECLARE @test varchar(20)
SET @test = NULL

SELECT QUOTENAME(ISNULL(@Test,''),'"') AS InsCompanyID2
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform