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
How do I replace #N/A if it is returned in a formula? (not Vlookup)
Find Pivot Table's Name
SQL command not properly ended
Try to open a Silverlight project on Visual Studio 2008 but I can't
How do I remove windows Encryption
VBA code to select the folder one level above this workbook's folder
Trying to rank top 10 records in Access query by a group
How to open and close an excel file from Scheduled Tasks
SSRS report Create a new data source for a parameter
Remove toolkit infection where browser is hijcked to r9237242.cn