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
Problems printing a pdf of an embedded graph in a report.
java based website not loading
How to discover the IP address of a wireless access point without looking at the DHCP client list
DropDownList Not Visible
TextBox and Validation Rule
windows xp recovery console Boot.ini /safeboot flag issues
Front page 2003 removal ?
Customizing MS Word 2007 RibbonX - ComboBox OnChange doesn't fire
How to write a query in Ms-Access 2007 to compare two fields in two tables?
Creating SQL Database during .NET setup