×
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

PSQL V10 nested procedures

PSQL V10 nested procedures

PSQL V10 nested procedures

(OP)
Hi First post here so hope i am following the correct procedure. I have multiple sql scripts that i want to cover by 1 script but can't seem to get the syntax correct. I have included below an example of what i am trying to do.

update "BAL_SHEET_DETAIL"
set ccy_cde = 2
where ccy_cde = 1

update "BAL_SHEET_DETAIL"
set ccy_cde = 1
where ccy_cde = 7

update "BANK_DIARY_FILE"
set accno_scurrency = '02'
where accno_scurrency = '01'

update "BANK_DIARY_FILE"
set accno_scurrency = '01'
where accno_scurrency = '07'

update "GENERAL_LEDGER"
set acc_no_currency = '02'
where acc_no_currency = '01'
all tables are contained in the same database but i am unable to write these into the same scripts.

any help would be great
thanks Bleep


 

RE: PSQL V10 nested procedures

What tool are you using?
What error are you getting?
Have you tried adding a semicolon ( ; ) or pound ( # ) at the end of each statement.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com

RE: PSQL V10 nested procedures

(OP)
Hi Mirtheil

Sorry forgot to say that i was using PSQL. The reason i want no net this is to ensure that the person that i running these changes does so in the correct order instead of running the cmd's 1 at a time and maybe missing one of them out.

Thanks
Bleep

RE: PSQL V10 nested procedures

So what exactly have you tried?
What error / behavior are you seeing?   

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com

RE: PSQL V10 nested procedures

(OP)
Thanks Mirtheil with your advice i have now got it working correctly. Do you know if there are any tools to be able to run sql scripts from the command line for PSQL or are we stuck with running through the pcc

 

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