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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner SQL script

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can I use regular programming commands such as "if then" statements in sql scripts within UNIX?

Here is some psuedo code to what I need to do:
SCRIPT>
If tablename.businessunit = '1'
execute "procedure1"

If tablename.businessunit = '2'
execute "procedure2"


"procedure1" is a script that selects certain fields and writes to a flat file
 
I thought the name of this forum was "UNIX Scripting"...

You might be better off asking this question at some kind of the DB/SQL forum......

 
Mcgusto:

You might also tell us what database vendor you're using. SQL scripts, generally, aren't all that portable between informix, oracle, SQL server, etc.

Regards,


Ed
 
mySQL forum is here: forum436 ***************************************
Party on, dudes!
[cannon]
 
Wrong forum, but nevertheless, think about using pl/sql(Oracle only) or C-embedded sql
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top