Microsoft
Software
Hardware
Network
Question : How to use "IsNull" with varchar datatype?
can anybody please explain what the second line of code is doing in the following statements.
I am trying to use some existing functionality, but I am not getting how to interpret this.
@GMTOffset varchar(5)
if len(ltrim(isNull(@GMTOffse
t,''))) = 0 set @GMTOffset = null
Thanks in advance!
Answer : How to use "IsNull" with varchar datatype?
Sure...it trims any spaces from the left and right of the variable and then looks at the length of the value in the variable. The ISNULL function puts an emptry string in place of a null valued variable.
Random Solutions
Setting Text Color in Title Bar
MS Access - automatically populate text field
Creating time series chart in Excel
Urgent System.UnauthorizedAccessE<wbr />xception
way to get min (or max) of field in query for report
Windows Home Vista fails to startup - Black screen with mouse pointer
Microsoft Reporting Services Event Log Error
Connect to a Crosstab query in Access from Excel
ASP.NET to Sharepoint: master page, types, and other problems
How can I install HP single sign on credentials manager onto a compaq TC4400 tablet running Windows 7?