>>>>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
>>
>
>I used ISNULL in my answer too (I embed the answer inside, may be you didn't notice). I just wanted to list both functions in my answer for the reference.
>
>BTW, on the SQL Server interview I was asked about the difference between these two functions and since I didn't use SQL Server that much I was unable to answer (if, of course, you don't consider "I can always check the details in BOL" as an answer ) :)
Why not?
For me that is a pretty legal answer.
BOL and VFP HELP are always open on my desktop :-)
The main point here is that you know WHERE you must search at first place ;-)
When I answer like this:
Check SomeFunction in BOL
And I get this as return:
What the f..k is BOL?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.