Subject char field and act as int field
Author James
Hi guys, can you please comment on this. I was trying to this select
below with a success. However I don't know how come the char field can
act like integer field.

select "DR ID", "DR No", "Cust ID", "Name", "Deliver Date", "Grand Total"
from "DR"
where "Deliver Date" >= '12/1/2003' and "Deliver Date" <= '12/31/2003'
and "DR No" is not null
and "DR No" >= '12062' and "DR No" <= '12437'
order by "DR No"

But this is my first attempt which i failed. I think its because I have
some record with null value on "DR No".

select "DR ID", "DR No", "Cust ID", "Name", "Deliver Date", "Grand Total"
from "DR"
where "Deliver Date" >= '12/1/2003' and "Deliver Date" <= '12/31/2003'
and "DR No" is not null
and cast("DR No" as integer) >= 12062 and cast("DR No" as integer) <= 12437
order by "DR No"

My question is in store procedure can I directly compare the char field
with integer field?

Any comments will be greatly appreciated. Thanks :-)

James