Passing SQL through a string parameter

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

Late to this thread, not sure if this will help, but we successfully use the following in an ODBC Connector stage to select from MSSql:

Code: Select all

CALLS.local_start_time >= {ts '#CALL_START_DATE_1# 00:00:00.000'}  AND
CALLS.local_end_time<= {ts '#CALL_END_DATE_1# 23:59:59.000'}
Single quotes around the parameters is, as I recall, the first requirement. After that, you have to balance the text parsing that DS does at runtime with the syntax requirements of your DBMS.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply