Hi DS Guru's,
Have a challenge to run this below given query .
Please help me which stage can be used to run the query ?
If possible ...How to implement it in design.
Query:
variable b1 VARCHAR2(40);
variable b2 VARCHAR2(40);
exec :b1 := '#$START_DATE#'
exec :b2 := '#$END_DATE#'
select
T1.ROW_ID AS PRIMARY_ID,
T3.ROW_ID AS MID_ID,
'SECDSBL43' AS TYPE_CD
FROM
SIEBEL.S_EVT_ACT T1,
SIEBEL.S_CONTACT T2,
SIEBEL.S_ACT_EMP T3
WHERE
T1.EVT_STAT_CD IN ('Done', 'Closed')
and T1.X_RECORD_TYPE = 'Sales'
AND T1.ROW_ID = T3.ACTIVITY_ID
AND T2.ROW_ID = T3.EMP_ID
and T2.EMP_FLG = 'Y'
and (((T3.LAST_UPD) > TO_DATE (:b1,'YYYY-MM-DD HH24:MI:SS') and T3.LAST_UPD) <= TO_DATE (:b2,'YYYY-MM-DD HH24:MI:SS'))
or ((T1.LAST_UPD) > TO_DATE (:b1,'YYYY-MM-DD HH24:MI:SS') and (T1.LAST_UPD) <= TO_DATE (:b2,'YYYY-MM-DD HH24:MI:SS')))
Looking for your kind help in this.
Thanks,
John
Which stage can be used to run this query from Data Stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 42
- Joined: Mon Oct 15, 2007 10:35 pm
- Location: Charlotte
- Contact:
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore
Re: Which stage can be used to run this query from Data Stag
As suggested define the parameters in the job properties and use API stages to read from the table and write into a file.
-
- Participant
- Posts: 42
- Joined: Mon Oct 15, 2007 10:35 pm
- Location: Charlotte
- Contact:
Which stage can be used to run this query from Data Stage
Defined project level parameters...
I can get the values from parameters...Want to execute....that entire query
Advice me which stage support to run the query....
Let me know if I'm not clear to you !!
Thanks,
John
I can get the values from parameters...Want to execute....that entire query
Advice me which stage support to run the query....
Let me know if I'm not clear to you !!
Thanks,
John
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Which stage can be used to run this query from Data Stag
Which stage to use depends upon which database you have. If it's Oracle, try the Oracle Connector stage.John Daniel wrote:Advice me which stage support to run the query....
Choose a job you love, and you will never have to work a day in your life. - Confucius