>>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.