V4RB ... why does this SQL fail?

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Mar 11 20:35:04 CST 2003


on 3/11/03 7:48 PM, Pedro fp at lists at pedro.net.au wrote:

> G'day Folks
> 
> [re-posting because I'm not sure I made the problem clear the 1st time]
> 
> In calculating meta-data my app has to select all records with the same
> value in one or other fields as the record being processed. Two of
> these fields can be empty. The one, a VVarChar, the SQL generated by my
> app is ...
> 
> SELECT RecID, line, GenXbaseID, framework_ptr FROM GenXbase WHERE
> frameWork LIKE '\A\Z' NO_CASE ORDER BY line
> 
> which works. The other field is a VText & the SQL is ...
> 
> SELECT RecID, line, GenXbaseID, frameblock_ptr FROM GenXbase WHERE
> frameBlock LIKE '\A\Z' NO_CASE ORDER BY line
> 
> which selects no records when frameBlock is null. This is where the
> problem is. There is a record that has just been created which has in
> frameBlock the value between \A & \Z. If that value is not null the
> select works, if not it doesn't.
> 
> I've also tried using "WHERE fieldName = ''" but that returns the same
> results.
> 
> Is this due to something about VText fields? Any other ideas?

Hmm, 

So you try to select NULL values by LIKE ?

This is not correct.

You need use 

    WHERE fld IS NULL


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list