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
Unable to remove printer driver for HP LaserJet 1300 PCL 5e
DHCP not updating DNS Reverse lookup zones
Complex SQL Query
Vista Home Basic & Vista Business - IE8 not supported
Combo Box List index
Remove first 5 characters from SQL
Reason for MyProj.csproj.FileListAbso<wbr />lute.txt
XP Home won't boot to HD
Excel function/formula
Cannot connect to Internet whilst on Cisco VPN