‎2008 Jan 03 10:00 AM
SELECT * FROM hrus_d2
INTO TABLE ta_list
WHERE us_name IN subs_obj
and begdat in date_ran.
and enddat in date_ran
How can I rewrite the above query for high and low ranges of date_ran field in condition? It doesn't allow in operator with date_ran-low.Can u please help me out
‎2008 Jan 03 10:05 AM
Hi
rahul
SELECT *
FROM hrus_d2
INTO TABLE ta_list
WHERE us_name IN subs_obj
and begdat = date_ran-low
and enddat = date_ran -high.
u can write like this or i amnot getting why u r expliciting this date u can give directly as
SELECT *
FROM hrus_d2
INTO TABLE ta_list
WHERE us_name IN subs_obj
date in date_ran.
plzz reward if i am usefull to u in any way.. plzz dont forget to reward
‎2008 Jan 03 10:03 AM
Hi,
if not date_ran is initial.
SELECT *
FROM hrus_d2
INTO TABLE ta_list
WHERE us_name IN subs_obj
and begdat = date_ran-low
and enddat = date_ran -high.
endif.
Edited by: Arunachalam, Selvapandian on Jan 3, 2008 3:33 PM
‎2008 Jan 03 10:18 AM
Hi,
I don't know if I got you right, but I would suggest:
SELECT * FROM hrus_d2 INTO TABLE ta_list
WHERE us_name IN subs_obj
AND ( begdat GE date_ran-low AND begdat LE date_ran-high )
AND ( enddat GE date_ran-low AND enddat LE date_ran-high ).
However, this code will only work for NO EXTENSION select options type.
Best regards,
Valter Oliveira.
‎2008 Jan 03 10:03 AM
When you want use ONLY high & low in your query then you must use EQ operator. like
begdat EQ date_ran-low
"OR
begdat EQ date_ran-high
‎2008 Jan 03 10:03 AM
Hi,
SELECT * FROM hrus_d2
INTO TABLE ta_list
WHERE us_name IN subs_obj
and begdat = date_ran-high.
‎2008 Jan 03 10:04 AM
Hi U can set those value independantly...
Like..
date_ran-high = 'value1'.
date_ran-low = 'value2'.
append date_ran.
‎2008 Jan 03 10:05 AM
Hi
rahul
SELECT *
FROM hrus_d2
INTO TABLE ta_list
WHERE us_name IN subs_obj
and begdat = date_ran-low
and enddat = date_ran -high.
u can write like this or i amnot getting why u r expliciting this date u can give directly as
SELECT *
FROM hrus_d2
INTO TABLE ta_list
WHERE us_name IN subs_obj
date in date_ran.
plzz reward if i am usefull to u in any way.. plzz dont forget to reward
‎2008 Jan 03 10:09 AM