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
Windows XP SP3 Laptop - Keyboard and Mouse not responding
Error Message, CS0103: The name 'TextBox31' does not exist in the current context
Using OPENXML in a Stored Procedure for an Infopath form submitted via Web Service
Access SQL: Self Join with Multiple Criteria
Setting up Server 2008 in a branch office with SBS 2008
Calling DLL function in release mode from exe in debug mode
The page cannot be displayed - 10060 - Connection timeout
Windows 7 Upgrade Advisor without Internet connection.
Exchange 2010 Management Console connects to the wrong server
Inserting mass amounts of data to sqlserver from vb.net