SQL for datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

SQL for datastage

Post by devsonali »

Hi all
I was wondering if there is anyonline documentation for SQL that goes in ODBC stages.
Thanks
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can extract it using the Reporting Assistant. It would take me a while to hack a solution otherwise. How bad you need it?
Mamu Kim
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Perhaps we should clarify the question. Devsonali, what exactly are you seeking? What 'online documentation' are you looking for in regards to SQL in ODBC stage - what kind of SQL you can use there? Or as Kim is asking, some way to create 'online documentation' from existing SQL your jobs are using?

Please help us understand your question.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The generated SQL in an ODBC stage will be fully compliant with the grammar specified in the ODBC 3.0 standard.
User-defined SQL can be anything legal for the database, as it is passed through unchanged by the driver. However, the parameter markers must correctly bind to the columns in the Columns grid.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
BIuser
Premium Member
Premium Member
Posts: 238
Joined: Thu Feb 02, 2006 4:03 am
Location: South Africa

Post by BIuser »

I have attempted to use an ODBC Connector and specified funtions such as CONVERT, DATEPART AND GETDATE() and i keep getting an error such as "Procedure undefined". The SQL statement runs correct in Microsoft SQL Query Analyzer but when the code is put into the ODBC Connector it doesnt recognise the funcitons.

Maybe Devonsali is having the same problem as me ?

If someone can assist me with this question too - I'd appreciate it.

Thanks
bArbara
-------------------------
https://www.ssa.co.za
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Maybe - but when you have a question, you should start your own thread. If you think it may be related to another issue, link to the other thread, don't hijack the other person's. Please.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ray - I'm not sure that's all true. We seem to have had postings lately where SQL that "works fine" in their favorite tool cannot be handled by the ODBC drivers. Barbara's and Mr IfThenElse for example. :?

And I know for a fact that the ODBC stage doesn't enforce the column binding like other stages do. Well... let me qualify. If you use parameter markers, they must be arranged so as to bind to the correct columns in the stage. I don't recall if any errors will be generated (ala OCI) or if your results will be... less than optimal.

However, it does not require that all columns be bound into the query, a fact I've taken advantage of in more than one case.
-craig

"You can never have too many knives" -- Logan Nine Fingers
BIuser
Premium Member
Premium Member
Posts: 238
Joined: Thu Feb 02, 2006 4:03 am
Location: South Africa

Post by BIuser »

Sorry for "hijacking" someone else's post.
I'm new.

Will start my own thread then. :oops:
-------------------------
https://www.ssa.co.za
Post Reply