confused_coder
asked on
sql vbscript if record null then
I want to skip over a record if it is null so it does not print the section of the data
currently I have this which does not work
<% IF (NOT ISNULL (rs("OrgPhoneTTY"))) THEN %>
<div>TTY <%=rs("OrgPhoneTTY")%></di v>
<% end if %>
but it still prints the TTY if its empty
currently I have this which does not work
<% IF (NOT ISNULL (rs("OrgPhoneTTY"))) THEN %>
<div>TTY <%=rs("OrgPhoneTTY")%></di
<% end if %>
but it still prints the TTY if its empty
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Both previous expert comments could be correct. if you go with amit's then you should do it all in 1 IF statement:
<% If Not isNull(rs("OrgPhoneTTY")) OR rs("OrgPhoneTTY")<>"" Then %>
<div>TTY <%=rs("OrgPhoneTTY")%></di v>
<% End If %>
~ MastaLlama ~
<% If Not isNull(rs("OrgPhoneTTY")) OR rs("OrgPhoneTTY")<>"" Then %>
<div>TTY <%=rs("OrgPhoneTTY")%></di
<% End If %>
~ MastaLlama ~
<% IF (NOT rs("OrgPhoneTTY") <> "" ) THEN %>
<div>TTY <%=rs("OrgPhoneTTY")%></di
<% end if %>