Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

select query

Former Member
0 Likes
514

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

4 REPLIES 4
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
487

try NE space

Read only

Former Member
0 Likes
487

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

Read only

Former Member
0 Likes
487

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

Read only

Former Member
0 Likes
487

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.