pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedsql startment problem PLEASE HELP .....
3+ messages / 3 participants
[nested] [flat]
* sql startment problem PLEASE HELP .....
@ 2001-07-04 17:49 penny <boy_66@hotmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: boy_66@hotmail.com @ 2001-07-04 17:49 UTC (permalink / raw)
To: pgsql-sql
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: sql startment problem PLEASE HELP .....
@ 2001-07-04 17:57 Stephen Bell <stephen.bell@cgi.ca>
parent: penny <boy_66@hotmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Bell @ 2001-07-04 17:57 UTC (permalink / raw)
To: pgsql-sql
Hi Penny,
I hope someone proves me wrong, but I don't think you can modify a
constraint like that....I believe you have to drop it and recreate it.
Steve
penny wrote:
> 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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: sql startment problem PLEASE HELP .....
@ 2001-07-05 13:42 Mark D Powell <mark.powell@eds.com>
parent: Stephen Bell <stephen.bell@cgi.ca>
0 siblings, 0 replies; 3+ messages in thread
From: mark.powell@eds.com @ 2001-07-05 13:42 UTC (permalink / raw)
To: pgsql-sql
Stephen Bell <stephen.bell@cgi.ca> wrote in message news:<3B43591F.5AEEBDB5@cgi.ca>...
> Hi Penny,
>
> I hope someone proves me wrong, but I don't think you can modify a
> constraint like that....I believe you have to drop it and recreate it.
>
> Steve
>
> penny wrote:
>
> > 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.
Penny, I believe Steve is correct. You can find the name of the
constraint to be dropped and recreated using the dba_constraints
dictionary view.
select constraint_name, constraint_type, search_condition, status
from sys.dba_constraints
where table_name = upper('&table_name')
/
You might need to add owner to the above if you have or allow the same
object_name under different owners.
-- Mark D Powell --
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2001-07-05 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-07-04 17:49 sql startment problem PLEASE HELP ..... penny <boy_66@hotmail.com>
2001-07-04 17:57 ` Stephen Bell <stephen.bell@cgi.ca>
2001-07-05 13:42 ` Mark D Powell <mark.powell@eds.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox