Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Parse SQL-statement in SQL-Plus

Re: Parse SQL-statement in SQL-Plus

From: Christopher Jung <cjung_at_blank.com>
Date: Sun, 12 Dec 2004 00:16:23 GMT
Message-ID: <r5Mud.7664$nE7.6442@newssvr17.news.prodigy.com>


ok... what Sybrand said...

but if you want to test syntax in dev,

I'd put the sql code ( not sqlplus code) into a stored procedure, correct it until the stored procedure compiles.

If you have statements that are just selects, you could make them select into just so they will compile for syntax checking..

"Sybrand Bakker" <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in message news:n0tlr0dd8aot21083pkd5rieqbs49va8up_at_4ax.com...
> On 11 Dec 2004 03:43:11 -0800, ohahaahr_at_hotmail.com (Ole Hansen)
> wrote:
>
> >I use SQL-Plus. How can i parse the entire file, before i execute it,
> >so that i can find the all the errors ???
>
> Basically you can't.
> Apparently you are performing syntax checks on a database with
> production data. This is precisely why development databases and user
> acceptance databases were invented: scripts should be error free
> before they hit production, and they should be written, not hacked
> together.
> Also it looks like your scripts doesn't have any error handling.
> Regrettably, this is very common nowadays, and it also something never
> should be done in a production environment.
>
>
>
> As a work-around you could load your script in Toad, and hit Ctrl-F9
> for every individual statement, and correct your typo's without doing
> anything.
>
>
> --
> Sybrand Bakker, Senior Oracle DBA
Received on Sat Dec 11 2004 - 18:16:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US