Application Development 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: 

what does like '2003%" mean

Former Member
0 Kudos

Hi can any one explain the behaviour of like statement below and tell me what exactly it does,what does % mean here..

SELECT * FROM SFLIGHT

INTO XFLIGHT

WHERE CARRID = 'LH'

AND CONID = '0300'

AND FLDATE LIKE '2003%'.

ENDSELECT.

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

it will select all the data which has the date starting with 2003... means all data for year 2003.

Regards,

Naimesh Patel

3 REPLIES 3

naimesh_patel
Active Contributor
0 Kudos

it will select all the data which has the date starting with 2003... means all data for year 2003.

Regards,

Naimesh Patel

former_member195698
Active Contributor
0 Kudos

It will select all the entries for the year 2003.

% is used to specify PATTERN.

Since the date is stored in the form YYYYMMDD.

Giving 2003% means select all entries with flight date starting with 2003

Former Member
0 Kudos

Hi Bhaskar,

which will get the data from SFLIGHT table with the records having CARRID = 'LH' and CONNID = '0300' and FLDATE starts with 2003.

Reward if it helps,

Satish