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

comparing numbers

Former Member
0 Likes
820

The numbers i want to compare are in a database. i am using the select statement (ie) select * from gfffff

where (fieldname) = jhkll-(fieldname).

the other number has leading zeros but the otherone does not have. the data type of the numbers is c.

5 REPLIES 5
Read only

Former Member
0 Likes
732

Hi Tendai,

You can do this before the select statement

Use the Fm " Conversion_EXIT_ALPHA_OUTPUT".

Exporting

Input = ws_num "(00000000000001)

Importing

Output = ws_num "(1).

Use this to chk in the SELECT stmt

Reward if useful.

Regards,

Chitra

Read only

Former Member
0 Likes
732

you can use CONVERTION_EXIT_ALPHA_INPUT to add leading zeros but try below logic.

In select statement we need to chnage the other component as its type

For example

select * from gfffff

where (fieldname) = jhkll-(fieldname).

suppose fieldname = type c

then

loop at jhkll

and store fieldname into some local table where fieldname type also C

endloop

then

select * from gfffff

where (fieldname) = locall-(fieldname).

Rewards if useful...............

Minal Nampalliwar

Read only

Former Member
0 Likes
732
select * from gfffff
where (fieldname) = jhkll-(fieldname).

suppose fieldname has 3 leading zeros, in that case, jhkll-(fieldname) in a local variable and concatenate 3 leading zeros before comperation. Ex:

concatenate '000'  jhkll-(fieldname) to lv1. 
select * from gfffff
where (fieldname) = lv1.

If jhkll-(fieldname) has 3 leading zeros then,

select * from gfffff
where (fieldname) = jhkll-(fieldname)+3.

Read only

0 Likes
732

This message was moderated.

Read only

Former Member
0 Likes
732

Moderator message - Please search before asking - post locked Rob