Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripts within scripts 1

Status
Not open for further replies.

buttersoft

Programmer
Jun 11, 2000
75
CH
In Oracle as example you can do:-

SPOOL c:\sqldata\output.txt
SELECT * FROM ftse100 ORDER BY EPIC
;
SELECT * FROM FTSE250 ORDER BY EPIC
;
SPOOL OFF

With this you will get everything from both files into the same text file.

; is the key, that lets you run several small scripts one after the other but only ever run the one .sql file.

Can you do this in Paradox?
[sig][/sig]
 
Sort of.

Paradox doesn't let you do this in queries run locally, but if you pass your SQL query directly to the remote server, it should work, as BDE doesn't try to process it. I haven't tried this myself, but based on my experience with the way BDE handles SQL queries, it should work---provided your remote server indeed supports the syntax.

Similarly, you can run multiple scripts from a single script, but you have to code it your self. For example:

method run( EventInfo Event )

play( "script1" )
play( "script2" )
play( "script3" )

endMethod

Will run all three scripts in series. Mind you, I'd add additional error-checking to ensure that each runs successfully, but that's a different thread. :)

hope this helps...

-- Lance
 
Thanks Lance, just what I needed, I must have been doing something wrong, but this will now do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top