Thread View: comp.databases.oracle.server
3 messages
3 total messages
Started by penny
Wed, 04 Jul 2001 17:56
sql statement ERROR please help......
Author: penny
Date: Wed, 04 Jul 2001 17:56
Date: Wed, 04 Jul 2001 17:56
31 lines
1571 bytes
1571 bytes
Hi all,
I am using Oracle8i Enterprise Edition in window 2000
my problem as following
~~~~~~~~~~~~~~~~~~~~~
SQL> create table ttt
2 ( name varchar2(100)
3 ,
4 constraint e check (name = lower(name)));
Table created.
SQL> alter table ttt
2 modify constraint e
3 check (name = upper(name));
check (name = upper(name))
*
ERROR at line 3:
ORA-00933: SQL command not properly ended
How can I modify constraint e ????
thanks.
Re: sql statement ERROR please help......
Author: Sybrand Bakker
Date: Wed, 04 Jul 2001 18:31
Date: Wed, 04 Jul 2001 18:31
44 lines
2175 bytes
2175 bytes
"penny" <boy_66@hotmail.com> wrote in message news:a7c8116a.0107040956.24128126@posting.google.com... > Hi all, > > > I am using Oracle8i Enterprise Edition in window 2000 > > my problem as following > > > > ~~~~~~~~~~~~~~~~~~~~~ > > SQL> create table ttt > 2 ( name varchar2(100) > 3 , > 4 constraint e check (name = lower(name))); > > Table created. > > SQL> alter table ttt > 2 modify constraint e > 3 check (name = upper(name)); > check (name = upper(name)) > * > ERROR at line 3: > ORA-00933: SQL command not properly ended > > > > How can I modify constraint e ???? > > thanks. You can't You need to drop the constraint and recreate it. Please try to consult the sql reference manual before posting these typing of questions. Regards, Sybrand Bakker, Senior Oracle DBA
Re: sql statement ERROR please help......
Author: Noel
Date: Thu, 05 Jul 2001 07:00
Date: Thu, 05 Jul 2001 07:00
69 lines
2815 bytes
2815 bytes
Yes, you only can change constraint_state in alter table modify
constraints.. clause.
BUT if you really need to change that in one SQL here there is:
(connect as user who got privileges to sys obj)
UPDATE sys.cdef$
SET condition = New_Codition_Here
WHERE con# = (
select c.con#
from sys.obj$ o, sys.cdef$ c, sys.con$ oc
where c.obj# = o.obj#
and o.name = 'TTT'
and oc.name = 'E'
and oc.con# = c.con#
);
Have Fun.
U�ytkownik "Sybrand Bakker" <postbus@sybrandb.demon.nl> napisa� w wiadomo�ci
news:tk6o36hpr5h2c1@beta-news.demon.nl...
>
> "penny" <boy_66@hotmail.com> wrote in message
> news:a7c8116a.0107040956.24128126@posting.google.com...
> > Hi all,
> >
> >
> > I am using Oracle8i Enterprise Edition in window 2000
> >
> > my problem as following
> >
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~
> >
> > SQL> create table ttt
> > 2 ( name varchar2(100)
> > 3 ,
> > 4 constraint e check (name = lower(name)));
> >
> > Table created.
> >
> > SQL> alter table ttt
> > 2 modify constraint e
> > 3 check (name = upper(name));
> > check (name = upper(name))
> > *
> > ERROR at line 3:
> > ORA-00933: SQL command not properly ended
> >
> >
> >
> > How can I modify constraint e ????
> >
> > thanks.
>
>
> You can't
> You need to drop the constraint and recreate it.
> Please try to consult the sql reference manual before posting these typing
> of questions.
>
> Regards,
>
> Sybrand Bakker, Senior Oracle DBA
>
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads