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

regarding the select query

Former Member
0 Likes
597

hi,

select docnum from edidc

into table itab

where direct = '1'

and mestyp = 'OILORD '

and rcvpor = 'WBM6_OIL '

AND CREDAT = '07/10/2007'

and ( status = '03' or status ='30' or status = '22' or status = '06' or status = '12' ).

when iam using this statement the records are not retrieved from the database.

select docnum from edidc

into table itab

where direct = '1'

and mestyp = 'OILORD '

and rcvpor = 'WBM6_OIL '

and ( status = '03' or status ='30' or status = '22' or status = '06' or status = '12' ).

when iam using this statement the records are retrieved from the database.

iam unable to understand the problem.

please give the guidance for this.

it is very urgent.

thanks in advance...

6 REPLIES 6
Read only

Former Member
0 Likes
556

AND CREDAT = '20071002'.

regardss

Peram

Read only

Former Member
0 Likes
556

The date should be given as '07.10.2007'.Try this and see

Regards,

Reema.

Read only

Former Member
0 Likes
556

The field "CREDAT" is having values in the format of "YYYYMMDD" in the table EDIDC. So you have use the same format in the query.

For example,

CREADAT = '20070701'

Read only

Former Member
0 Likes
556

Hi,

Please see the format of date,whatever you give in quotes will be taken as a string input and will be matched char by char...if there is any small diff it will not be selected...CREDAT is of type DATS go to itns data element ie EDI_CCRDAT,

you will see that it is s Date field (YYYYMMDD) stored as char(8)

i think you got your answer.

thanks and regards

vivekanand

Read only

Former Member
0 Likes
556

date should be entered in <b>yyyymmdd</b> format for the field <b>CREDAT</b>.

regards,

srinivas

<b>*reward for useful answers*</b>

Read only

Former Member
0 Likes
556

Hi ,

In the table EDIDC the field CREDAT is stored as DD.MM.YYYY.

so, while writing the query you have to use that format.

Try like this.

rgds

harris