Pat,

I used to make many comma errors like that until I finally
adopted a coding standard that has virtually eliminated
them, as well as many others.  The simple rule is "Vertical,
Preferably Left, but Always Vertical", meaning all my SQL
and PL/SQL is formatted so that nothing of importance ends
up "ragged right".

For me, at least, it's so much easier to scan vertically and
see a pattern anomaly - such as missing punctuation - than
to scan left and right on the "ragged right".  "Vertical
Left" also helps keep all the ||s straight when I'm
concatenating stuff.

I'd have formatted your Create Table statement like this,
which allows my old eyes to much more easily see if I've
left off a comma, paren or semicolon:

Create Table Catrec
( Abstract      VARCHAR2(3000)
, Add_Dt        VARCHAR2(32)
, Altti         VARCHAR2(200)
, Au            VARCHAR2(1504)
...
, Year          VARCHAR2(32)
)
;

Going a little farther with this standard has me using the
following kinds of formatting:

Select t1.Col1             c1
     , t2.Another_Col2     c2
     , t2.Yet_Another_Col3 c3
>From   Table1              t1
     , Big_Old_Table2      t2
Where  t1.Col1          = 3
And    t2.The_Other_Col = t1.My_Col
And    t2.Col3          = 'NOPE'
;

Actually, this Select statement tries to do some "Vertical
Right" and "Vertical Middle" formatting as well.  Any
"Verticalizing" helps!

If    <condition>
Then  <do something>
ElsIf <another condition>
Then  <do something else>
Else  <do the default thing>
End If
;

While <condition>
Loop
  <do stuff>
End Loop
;

I find this makes for easy-to-read, therefore
easier-to-maintain, code.  Anyway, I'll climb down off my
soapbox now - I've evangelized enough.

Jack

--------------------------------
Jack C. Applewhite
Database Administrator/Developer
OCP Oracle8 DBA
iNetProfit, Inc.
Austin, Texas
www.iNetProfit.com
[EMAIL PROTECTED]


-----Original Message-----
Gorden-Ozgul, Patricia E
Sent: Thursday, March 08, 2001 10:48 AM
To: Multiple recipients of list ORACLE-L
I'll bet I'm doing something really stupid here.
Can anyone find my error?

I'm getting the following error on execution:
create table catrec (
                    *

ERROR at line 1:
ORA-00922:  missing or invalid option

huh?


create table catrec (
        abstract        VARCHAR2(3000),
        add_dt          VARCHAR2(32),
        altti           VARCHAR2(200),
        au              VARCHAR2(1504),
...

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jack C. Applewhite
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to