×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

scripts and stored procedures

scripts and stored procedures

scripts and stored procedures

(OP)
hi, thanks a lot richman for helping me with my doubt, i have another question, pls bear with me :) i was wondering if i can package some script files as well as .sql files together in a single commandfile and execute it? or do they have to be in seperate commandfiles?

RE: scripts and stored procedures

hi , you can always write a shell script and embed any sql command in it.It may not be in a single command line.

Regards

RE: scripts and stored procedures

(OP)
but i dont want to embed any commands, i want the script to be seperate from the sql statements but to be stored in a single file. i dont know if that is too far fetched but i would like to know if that can be done.
Thanks a lot for replying.

RE: scripts and stored procedures

sweetsgup,

  I don't exactly know what you are asking. Given that I will say (again in Unix) that you can have one command file that executes SQL in separate file(s). For example;

Note: DBNAME is your database name

echo "`date` This executes sql_file_1"
dbaccess DBNAME sql_file_1.sql
echo "`date` This executed sql_file_1"
.
.
echo "`date` This executes sql_file_2"
dbaccess DBNAME sql_file_2.sql
echo "`date` This executed sql_file_2"

and so on . . .  
This is one command file executing 2 sql files residing outside of it.

Hope this helps!

RE: scripts and stored procedures

(OP)
Thanks a lot richman, i apologise for being vague but the last mail finally sunk in, i see the light :)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close