Topic: IS NULL / IS NOT NULL
Hello Dmitry and all MVD fans,
Sometimes, to check the existence of a value in database I perform a
SELECT COUNT(id)....
Obviously, if there is not occurrence of what I am looking for, the returned result is 0 because I asked for a count.
But sometimes it's not possible or not handy to count, and I just check the database with something like
SELECT id_bundle FROM bundle_asset WHERE id_asset="'+IntToStr(asset_id)+'"
then I make a conditional statement to act upon the result.
But if there is no result, how should I test the result in Delphi script?
if id_bundle IS NULL then...
if id_bundle 'IS NULL' then...
if id_bundle (IS NULL) then...
if id_bundle = 0 then...
the = 0 seems to work but I am not confortable to compare 'no result' with 0....
Any idea ?
Mathias
Each time I get a divorce, I keep the house
Zaza Gabor