Question Locked

Conerting a text field to integer by checking the null fields

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

Im using an access db for an asp application and I want to convert a Text field to Integer field and in that some of the record will not have any value for that field.

I tried with following query
SELECT [id]
FROM Customers
WHERE Cint([heightft],0) >= 6;

Where the field heightft is the text field and I want to convert it to int but it returns an error invalid use of null because of the null values for the heightft.

So I tried with Nz function its working fine in the access db but its showing undefined function error in asp code.
SELECT [id]
FROM Customers
WHERE Cint(Nz([heightft]),0) >= 6;
Is there any equivalent function for Nz (I have tried IsNull but not working). Any idea

Appreciate any help.
Thanks in advance.

1 reply

This discussion is closed to new replies.