11-09-2007 2:41 PM
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.
11-09-2007 2:43 PM
it will select all the data which has the date starting with 2003... means all data for year 2003.
Regards,
Naimesh Patel
11-09-2007 2:43 PM
it will select all the data which has the date starting with 2003... means all data for year 2003.
Regards,
Naimesh Patel
11-09-2007 2:43 PM
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
11-09-2007 2:43 PM
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