‎2007 Dec 07 6:53 AM
Hi,
In a select query where condition I need to validate amount field which should be greater than spaces.
amount field is char(10),
In select query am validating as amount gt space. However it is wrong as amount is in char hence I cant compare with space.
any tip ?
Regars
AAkash
‎2007 Dec 07 6:56 AM
‎2007 Dec 07 6:56 AM
Hi, when u r not give anything in the amount field, it becomes '0'. So ucheck before query process with GT '0' and execute.
Suku
‎2007 Dec 07 6:59 AM
Hi Aakash,
Instead of using amount gt space in where clause.
U first select all the amount in ITAB.
then u code
Delete itab where not amount gt 0. " use 0 or ' '
If it is usefull pls do rewrd.
Regards
srimanta
‎2007 Dec 07 7:01 AM
Try with
IF NOT <FIELD> IS INITIAL.
where it will check the field if it is having a 0 if it is a numeric field and spaces if it is character field.
Reward Points if useful.