addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

NYC Postgres Message Board › Executing multiple sql statements in one query window

Executing multiple sql statements in one query window

A former member
Post #: 2
Hi all,
As a MS SQL DBA, I am getting thrown on syntax in Postgres :(
If this is not the correct forum for Q&A, please let me know if there is such a site out there somewhere :)

I am trying to execute the 2 below statements at the same time, but I get an error.
"ERROR: syntax error at or near "select"
SQL state: 42601
Character: 95"

select count(*) from TableOne where TransType = '51046' AND detail not like '%999999999%'
select count(*) from TableOne where TransType = '51046'

I am sure it is possible see both outputs at the same time in one query but I can't seem to figure it out. I am sure it's just a syntax issue like using overlay instead of replace.
I tried to place a GO between them but that did nothing.

Thanks again,
Powered by mvnForum

People in this
group are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy