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 2 different data types for SQL statement

Former Member
0 Likes
663

I would like to ask if anyone have sample program for the following situation.

1. An internal table field – data type is DEC

2. a variable - data type of C

I need to compare 1 and 2 for my SQL statement. How can I go about it?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
537

Hi,

Move ITAB_DATE-VALID_TO to a temporary char field .

condense this temporary char field to remove empty spaces.

Then u can compare it with any character data type.

Regards,

Hemant

3 REPLIES 3
Read only

Former Member
0 Likes
537

Hi,

declare another character variable.

before comparing pass the decimal value to a character variable and compare that character value with the variable.

<b>Reward for helpful answers</b>

Satish

Read only

0 Likes
537

LOOP AT ITAB_DATE.

WRITE:/ ITAB_DATE-VALID_TO.

ENDLOOP.

ITAB_DATE-VALID_TO is of data type DEC.

How can i proceed?

Read only

Former Member
0 Likes
538

Hi,

Move ITAB_DATE-VALID_TO to a temporary char field .

condense this temporary char field to remove empty spaces.

Then u can compare it with any character data type.

Regards,

Hemant