Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NULL value in results
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01323872
Message ID:
01323879
Vues:
15
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform