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

Get Left String in query.

Former Member
0 Likes
506

Hi ,

I need to check the first char of a table field in a query.

i now that on global filed i can do like this:


IF name(1) = '7'.
  do something.
ENDIF.

How can i do that here :


 SELECT  carrid connid fldate seatsocc seatsmax
    FROM sflight
                INTO CORRESPONDING FIELDS OF wa_flight
                WHERE left (carrid,1) = '7'

Thanks.

1 ACCEPTED SOLUTION
Read only

dhruv_shah3
Active Contributor
0 Likes
397

Hi,

If your requirement is just fetching the records which starts from 7 then you can use the Like clause in the select query.

HTH

Regards,

Dhruv Shah

2 REPLIES 2
Read only

Former Member
0 Likes
397

You cant. You need to read the table field into a working field then check it there.

You cannot use offset values for select statements.

Read only

dhruv_shah3
Active Contributor
0 Likes
398

Hi,

If your requirement is just fetching the records which starts from 7 then you can use the Like clause in the select query.

HTH

Regards,

Dhruv Shah