Page 1 of 1

Query within a Routine

Posted: Tue Feb 14, 2006 3:37 am
by sengs
Hi,
How to write a SQL query within a routine..Please provide me some examples.
Thanks,
Sengs

Posted: Tue Feb 14, 2006 3:42 am
by ArndW
A database query can be called in a routine by using a DSExecute() call to your operating system to call whatever command you use at your terminal window to issue SQL queries.

It usually is much better (and more efficient) to do this with the appropriate DataStage database connection stage.

Posted: Tue Feb 14, 2006 3:52 am
by ameyvaidya
Hi Sengs,
what you are looking for are called BCI functions.
This <a href="http://66.34.129.47/viewtopic.php?t=978 ... +functions"> link</a> leads to an example post. You can search for others.
From what I've read in DSXchange, its usually too complex to use these functions. Work arounds involving getting data in hashed files and using BASIC functions on them are easier to develop
IHTH