I have a table test1, there is a field num, the field num has a null value, there is a null value, and there are other values, and I want to use the ASP statement to determine whether the value of num I am querying is a null value. How to write
be rigorous, with two layers of judgment:
If IsNull (rs ("num")) Or rs ("num") = "Then
.....
End If
because the field is sometimes written to empty data, if it is written, but the data is empty, the value of the field is empty (""), and it is not NULL, so there are two layers to judge.
...
<td> Order Amount Statistics </td>
<td><%
sql= "select SUM (Price) as Num from [T_order] where DateDiff (' d ', Addtime,now ()) =0 "&wherestr&" "
Set Rs=server.createobject (" Adodb.recordset ")
Rs.Open sql,conn,0,1
' rs_total=rs (0)
If IsNull (rs ("num")) Or rs ("num") = "then
Response.Write" 0 "
Els E
Response.Write ("num")
End If
Rs.close
Set rs = Nothing
%>
</td>
SQL database n ULL the ASP statement to determine the problem