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

PSQL V10 nested procedures

Status
Not open for further replies.

bleep

Technical User
Apr 9, 2003
3
CA
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


 
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
 
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
 
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top