Dynamic prepared Sql using routines

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
Ush
Participant
Posts: 55
Joined: Tue Dec 04, 2007 3:15 am

Dynamic prepared Sql using routines

Post by Ush »

Has anyone created user-defined dynamic SQL in routine. I have a lookup table that contains the name of the column I need to update. I want to pass the column name to my update statement.

I want this to be done only using routines

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Posting the same question more than once won't get you any additional or bette ranswers. In fact, chances are that you've lowered your chances.
rodre
Premium Member
Premium Member
Posts: 218
Joined: Wed Mar 01, 2006 1:28 pm
Location: Tennessee

Post by rodre »

Do a search using SQLExecDirect or SQLAllocStmt or SQLNumResultCols. It can be done but it is pretty extensive code I found out.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Search the forum for "BCI". The DataStage BASIC SQL Client Interface (BCI) is a set of DataStage functions that mimic the ODBC API functions. You can do whatever you like (in an SQL realm) with these.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
CharlesNagy
Premium Member
Premium Member
Posts: 66
Joined: Mon Feb 21, 2005 10:40 am
Location: Paris

SQL Client Interface Guide

Post by CharlesNagy »

There is an SQL_Client_Interfac_Guide.pdf which may have come with your Datastage documentation on your installation disc. This has an SQL client Interface demonstration program on it which may show you how to do it.
Post Reply