dbTalk Databases Forums  

Update Table

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Update Table in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rosh157
 
Posts: n/a

Default Update Table - 11-18-2007 , 02:20 PM






Hi every one:
i'm kind of new in Sql*plus and Oracle and i have some problem in
Update the value in one of the table.I want a Write an UPDATE
statement to change values of SERVICE.Description from, Mens Shirt to,
Mens' Shirt. when i try to do that the error show me that:

SQL> UPDATE Table Service
2 SET Description='Mens's Shirt'
3 WHERE Deccription='Mens Shirt';

ERROR:
ORA-01756: quoted string not properly terminated

I don't know how i have to close the quoted string.
This is a select statement from service:
SQL> select * from service;

SERVICE DESCRIPTION
UNITPRICE
---------- --------------------------------------------------
----------
10 Mens Shirt
1.5
11 Dress Shirt
2.5
15 Women Shirt
1.5
16 Blouse
3.5
17 Dress
4.5
20 Slacks-Men
5
25 Slacks-Women
6
30 Skirt
5
31 Dress Skirt
6
40 Suite-Men
9
45 Suite-Women
8.5

SERVICE DESCRIPTION
UNITPRICE
---------- --------------------------------------------------
----------
50 Tuxedo
10
60 Formal Gown
10

13 rows selected.
and i using Sql*Plus on oracle.
i would Thanks a lot if some one can help me with this.
Thanks.

Reply With Quote
  #2  
Old   
shakespeare
 
Posts: n/a

Default Re: Update Table - 11-18-2007 , 02:41 PM







"Rosh157" <kouroshsaei (AT) gmail (DOT) com> schreef in bericht
news:019d16d3-1185-4389-aeb5-272ec87715c0 (AT) s12g2000prg (DOT) googlegroups.com...
Quote:
Hi every one:
i'm kind of new in Sql*plus and Oracle and i have some problem in
Update the value in one of the table.I want a Write an UPDATE
statement to change values of SERVICE.Description from, Mens Shirt to,
Mens' Shirt. when i try to do that the error show me that:

SQL> UPDATE Table Service
2 SET Description='Mens's Shirt'
3 WHERE Deccription='Mens Shirt';

ERROR:
ORA-01756: quoted string not properly terminated

I don't know how i have to close the quoted string.
This is a select statement from service:
SQL> select * from service;

SERVICE DESCRIPTION
UNITPRICE
---------- --------------------------------------------------
----------
10 Mens Shirt
1.5
11 Dress Shirt
2.5
15 Women Shirt
1.5
16 Blouse
3.5
17 Dress
4.5
20 Slacks-Men
5
25 Slacks-Women
6
30 Skirt
5
31 Dress Skirt
6
40 Suite-Men
9
45 Suite-Women
8.5

SERVICE DESCRIPTION
UNITPRICE
---------- --------------------------------------------------
----------
50 Tuxedo
10
60 Formal Gown
10

13 rows selected.
and i using Sql*Plus on oracle.
i would Thanks a lot if some one can help me with this.
Thanks.
There's a quote in Men's shirt closing your string. That's the problem.

Shakespeare




Reply With Quote
  #3  
Old   
Rosh157
 
Posts: n/a

Default Re: Update Table - 11-18-2007 , 03:56 PM



On Nov 18, 12:41 pm, "shakespeare" <what... (AT) xs4all (DOT) nl> wrote:
Quote:
"Rosh157" <kouroshs... (AT) gmail (DOT) com> schreef in berichtnews:019d16d3-1185-4389-aeb5-272ec87715c0 (AT) s12g2000prg (DOT) googlegroups.com...





Hi every one:
i'm kind of new in Sql*plus and Oracle and i have some problem in
Update the value in one of the table.I want a Write an UPDATE
statement to change values of SERVICE.Description from, Mens Shirt to,
Mens' Shirt. when i try to do that the error show me that:

SQL> UPDATE Table Service
2 SET Description='Mens's Shirt'
3 WHERE Deccription='Mens Shirt';

ERROR:
ORA-01756: quoted string not properly terminated

I don't know how i have to close the quoted string.
This is a select statement from service:
SQL> select * from service;

SERVICE DESCRIPTION
UNITPRICE
---------- --------------------------------------------------
----------
10 Mens Shirt
1.5
11 Dress Shirt
2.5
15 Women Shirt
1.5
16 Blouse
3.5
17 Dress
4.5
20 Slacks-Men
5
25 Slacks-Women
6
30 Skirt
5
31 Dress Skirt
6
40 Suite-Men
9
45 Suite-Women
8.5

SERVICE DESCRIPTION
UNITPRICE
---------- --------------------------------------------------
----------
50 Tuxedo
10
60 Formal Gown
10

13 rows selected.
and i using Sql*Plus on oracle.
i would Thanks a lot if some one can help me with this.
Thanks.

There's a quote in Men's shirt closing your string. That's the problem.

Shakespeare- Hide quoted text -

- Show quoted text -
Yes i knew that's a problem ,and i can't and i don't know how to do it
because i have to change that to"Men's Shirt"
and show it in the table.


Reply With Quote
  #4  
Old   
Ruud de Koter
 
Posts: n/a

Default Re: Update Table - 11-18-2007 , 04:02 PM



Hi Rosh157,
Quote:
On Nov 18, 12:41 pm, "shakespeare" <what... (AT) xs4all (DOT) nl> wrote:


Hi every one:
i'm kind of new in Sql*plus and Oracle and i have some problem in
Update the value in one of the table.I want a Write an UPDATE
statement to change values of SERVICE.Description from, Mens Shirt to,
Mens' Shirt. when i try to do that the error show me that:
SQL> UPDATE Table Service
2 SET Description='Mens's Shirt'
3 WHERE Deccription='Mens Shirt';
ERROR:
ORA-01756: quoted string not properly terminated
I don't know how i have to close the quoted string.

There's a quote in Men's shirt closing your string. That's the problem.

Shakespeare- Hide quoted text -

- Show quoted text -

Yes i knew that's a problem ,and i can't and i don't know how to do it
because i have to change that to"Men's Shirt"
and show it in the table.
You should escape the quote using the quote character. So your update
string would be 'Men''s Shirt' instead of 'Men's Shirt'.

Regards,

Ruud de Koter.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.