Page 1 of 1

Function or variable to get table name and field name

Posted: Mon May 12, 2008 4:46 am
by tsktsk123
and field name of that table in its condition. Appreciate greatly if you could let me know about the variable or function in DS to get table name and Field name

Thanking in advance !!

Re: Function or variable to get table name and field name

Posted: Mon May 12, 2008 5:08 am
by khanparwaz
tsktsk123 wrote:and field name of that table in its condition. Appreciate greatly if you could let me know about the variable or function in DS to get table name and Field name

Thanking in advance !!
I did not get your question...

Do you want to extract data from any database using any DSPX stage??

If so then you need to know which table you want to extract data from.

Please elaborate the question!

Posted: Mon May 12, 2008 6:35 am
by tsktsk123
My requirement is to extract the table name and field name from the database (Oracle) of the source record. We have not stored the table names and fields in the database.

i.e.say my table name is EMP which has the following fields EMP_NO, EMP_NAME and EMP_DEPT.

I just wanted to know is there any function or variable which can get the table name & field name i.e function should return the table name as EMP and the field names EMP_NO, EMP_NAME and EMP_DEPT.

Posted: Mon May 12, 2008 7:05 am
by ray.wurlod
There is nothing directly available within a DataStage stage. You can code using the ODBC API - in which case the function is SQLTables() to retrieve a list of tables (optionally filtering with a wildcard name).