Page 1 of 1

executing SQL queries that are in a table's column

Posted: Sat Oct 08, 2005 10:33 am
by vinodhraj
hi,

I am having a query which is in a column of a database table. Is it possible to execute it in DS?

thanks

vinod

Posted: Sat Oct 08, 2005 11:03 am
by roy
Hi and Welcome aboard :),
In general yes.
It might be more easy in Server job then in PX job (having realized you posted in the EE forum with Server job type... moving post...).
Can you describe what yoiu need to do in more detail?
Is it only one query or a set of queries?

IHTH,

Posted: Sat Oct 08, 2005 11:14 am
by roy
Hi Again :),
DB Stage performing the select into a single varchar column marked as key going to a DB Stage performing a user defined sql with :1 in it should work (though I don't have DS avail at the moment to verify it).

If this won't work then use a tramsformer to run other jobs that get the statement as parameters and use that as your user defined sql.

IHTH,

Posted: Sat Oct 08, 2005 11:36 am
by vinodhraj
hi,

one small correction, I have to execute a set a queries and the output should be put into different text files.The name of these text files exists in another column of the table in which the SQL exists.

Posted: Mon Oct 10, 2005 1:37 am
by roy
Hi,
Are you interested in hiring my services?
This kind of request over private message sounds like it.
If not then you were better off writing this in your post not send it via private message.

Alas I have not the spare time to give you exact tested solution at the moment. (I can assure you it can be done though)
Perhaps some one else can contribute a more precise solution.

P.S.
I posted this in the hope it might actually help you get help here rather then anything else :!:
hi roy,

U had told executing Queries which is in a column of a table can be executed.

My problem is all the queries has to be executed and the results to be populated into as many text files according to their corresponding queries. these text file names were available in another column of the table in which SQL query exists.

any solution

thanks

vinod

please send the reply in this ID's <Email address removed>

Posted: Mon Oct 10, 2005 5:36 am
by kduke
This is done in several jobs included in EtlStats. Most of these are used in reports. The QA jobs will calculate one measure and store it in a table. There is one measure for a source table and one for the target table then these are compared in a report to show completeness of the data warehouse load. Do a search. These are covered in other posts.