SELECT IsNull(Field_1,'') +'¿'+ IsNull(Field_2,'') + '¿'
from Table_1
WHERE Condition = 21
John
-----Original Message-----
From: Usman Farhat [mailto:Usman.[Email Address Removed]
Sent: Tuesday, April 22, 2003 10:13 AM
To: LazyDBA.com Discussion
Subject: String Problem
Hi Everyone,
I have some problem managing string that is composed in following manner
ABC¿DEF¿LEF¿8¿¿¿¿¿
Situation is this that in one table a triger insert string like this in this string Character
seperated by "¿" Comes from different table which we get from one Query with select.
For example in this case
Our select has
ABC
DEF
LEF
8
as different values that are collected from different tables, and then trigger combine these variables
as string i.e "ABC¿DEF¿LEF¿8¿¿¿¿¿" and inserts in table .
Now problem is when some value is collected as "NULL" trigger inserts all the string Null in the table.
i.e if any value is null , string is inserted Null , instead when at place of Null there is some empty value
' ' like this it works fine. How can i manage this situation , i have tried to use case , but case does
not manage this problem , i want when there is any null value then trigger replace it with ' '.
If this is the example query what will be the solution...
SELECT Field_1 +'¿'+ Field_2 + '¿'
from Table_1
WHERE Condition = 21
Thanks,
Usman
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page