Subject | SubQuery with Date |
---|---|
Author | Arvee |
Post date | 2002-09-17T08:35:29Z |
Hi there,
I tried to use a subquery in FB as same as in MSSQL. But it returned
NULL values. I'm not quite sure in SELECT statement. Could anyone
check it for me again?
Select FK1_AGENCY_CD ,FK2_PRODUCT_CD
,FK2_PACKAGE_CD ,ORIGN_PAX_NB
,ADD_PAX_NB ,CUTOFF_PAX_NB
,BOOKED_PAX_NB ,FK2_SCHDEPART_TRIP
,CUTOFF_DATE ,COMMENTS
From TALLOTMENT
Where FK2_SCHDEPART_TRIP IN
(Select TRIP_SEQ_NB From TSCHED_DEPART
Where DEPT_SCHE_STATUS = 'OPEN' AND
DEPATURE_DATE in (SELECT current_date + DAYS_BEFDEPT_NB
FROM tcutoff_rule));
Thanks a lot.
I tried to use a subquery in FB as same as in MSSQL. But it returned
NULL values. I'm not quite sure in SELECT statement. Could anyone
check it for me again?
Select FK1_AGENCY_CD ,FK2_PRODUCT_CD
,FK2_PACKAGE_CD ,ORIGN_PAX_NB
,ADD_PAX_NB ,CUTOFF_PAX_NB
,BOOKED_PAX_NB ,FK2_SCHDEPART_TRIP
,CUTOFF_DATE ,COMMENTS
From TALLOTMENT
Where FK2_SCHDEPART_TRIP IN
(Select TRIP_SEQ_NB From TSCHED_DEPART
Where DEPT_SCHE_STATUS = 'OPEN' AND
DEPATURE_DATE in (SELECT current_date + DAYS_BEFDEPT_NB
FROM tcutoff_rule));
Thanks a lot.