Hi all,
I have the following problem.
I have a file where there is a column that contains a SQL Command.
I Want read this column and then, for each row that I read, I want execute that query.
Is it possible to do this thing? And how can I do it?
Thank you in advance.
Federico
Run a Query from external command
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
You could do this, but don't expect fantastic performance. Also, you have not indicated what you want to do with the output from these queries.
Basically you need to construct a simple routine that invokes the shell to execute your commands, using the DSExecute() routine or the Perform or Execute statements.
You could do this, but don't expect fantastic performance. Also, you have not indicated what you want to do with the output from these queries.
Basically you need to construct a simple routine that invokes the shell to execute your commands, using the DSExecute() routine or the Perform or Execute statements.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thank you for your suggest,
I need to read some columns of a table to get the statistic about a previous feeding of that table.
I try to explain better my problem.
I have a table that contains a column where there are preconstructed query on various tables.
I have to read that column and then I have to execute the query that I have read.
Is not important that I have very high performance because the row that I read is only one and the columns are 3 or 4, so I haven't a big amount of data.
Regards
I need to read some columns of a table to get the statistic about a previous feeding of that table.
I try to explain better my problem.
I have a table that contains a column where there are preconstructed query on various tables.
I have to read that column and then I have to execute the query that I have read.
Is not important that I have very high performance because the row that I read is only one and the columns are 3 or 4, so I haven't a big amount of data.
Regards
Pretty sure we understood all that and what Ray posted still stands regarding how they could be executed. However, still curious about the "and then what?" part of the question. Sure, you need to "run" them - but then what? Where does the output need to go?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
