Topic: [Solved]-Checking for NULL values
Hello Dmitry and all MVD fans,
I feel a bit ashamed to ask such a question, but I've been asking it to myself so many times, and so many times found workarounds because I had no answer, that I think it is time to ask it.
Sometimes, I have to check my database for the presence of data.
As I don't known how to do it, instead of looking for null values, I check the count = 0.
if count=0 then data does not exist.
How could I properly check a table field for NULL values ?
For example, if this query returns a NULL value because there is not asset with id 30000
asset_name := SQLExecute('SELECT asset.asset_name FROM asset WHERE asset.id = 30000');
What is the correct DELPHI script syntax ?
if asset_name IS NULL then
or
if asset_name = NULL then
or
if NULL asset_name then
....
Thank you in advance, I've been waiting too long to ask that question
Cheers
Mathias
Each time I get a divorce, I keep the house
Zaza Gabor