NULL values in a lookup

tetem

New Member
How do I avoid an error when doing a lookup from a MSSQL table? If i lookup records and one is NULL in the DBASE I get an error.By lookup, do you mean in a SELECT statement? Assuming that is the case, this is what I do:<BR><BR>SELECT valueA, ISNULL(valueB,'') as newValueB FROM mytable<BR><BR>This takes any NULL value for valueB and returns an empty string. You could also handle this on the ASP site, rather than within SQL, but I find the above method easier.
 
Back
Top