unable to update table [message #200713] |
Wed, 01 November 2006 01:06 |
ashish_pass1
Messages: 114 Registered: August 2006 Location: delhi
|
Senior Member |
|
|
hi all
i have updated several rows on a table but i fail to update one row. i m in a puzzle now.by that method i update the other rows but why '0 row update' message i got on that particular row.
my table & queries r as follw--
ashish>update BOOKSHELF set categoryname='adultfree', rating=2
2 where AUTHORNAME='soren kierkegaard';
0 rows updated.
TITLE AUTHORNAME CATEGORYNAME RATING
------------------------------ ------------------------- ------------ ----------
to kill a mocking bird harper lee adultfic 5
wonderfull life stephen jay gould adultnf 5
innumeracy john allen paulos adultnf 4
kierkegaard anthology robert bretall adultref 3
kierkegaard anthology soren kierkegaard
anne of green gables lucy maud montgomery childrenpic 1
good dog, carl alexandra day
letters and papers from prison dietrich bonhoeffer
8 rows selected.
ashish>update BOOKSHELF set categoryname='childrenfic', rating=3
2 where AUTHORNAME ='alexandra day';
1 row updated.
ashish>update BOOKSHELF set categoryname='adultnf', rating=4
2 where AUTHORNAME='dietrich bonhoeffer';
1 row updated.
with regards
ashish
|
|
|
|
Re: unable to update table [message #200731 is a reply to message #200713] |
Wed, 01 November 2006 02:03 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Looking at the data you presented
TITLE AUTHORNAME CATEGORYNAME RATING
------------------------------ ------------------------- ------------ ----------
kierkegaard anthology soren kierkegaard
You seem to have the authorname and categoryname the wrong way round.
|
|
|
|
Re: unable to update table [message #200739 is a reply to message #200735] |
Wed, 01 November 2006 02:32 |
ashish_pass1
Messages: 114 Registered: August 2006 Location: delhi
|
Senior Member |
|
|
hello JRowbottom
my table is like this---(which was as earlier)
SQL> select * from bookshelf;
TITLE AUTHORNAME CATEGORYNAME RATING
------------------------------ ------------------------- ------------ ----------
to kill a mocking bird harper lee adultfic 5
wonderfull life stephen jay gould adultnf 5
innumeracy john allen paulos adultnf 4
kierkegaard anthology robert bretall adultref 3
kierkegaard anthology soren kierkegaard
anne of green gables lucy maud montgomery childrenpic 1
good dog, carl alexandra day childrenfic 3
letters and papers from prison dietrich bonhoeffer adultnf 4
8 rows selected
kierkegaard anthology comes under titlesoren kierkegaard comes under authorname
now is there any doubt?
please provide me help.
with regards
ashish
|
|
|
|
Re: unable to update table [message #200796 is a reply to message #200713] |
Wed, 01 November 2006 06:34 |
ashish_pass1
Messages: 114 Registered: August 2006 Location: delhi
|
Senior Member |
|
|
hello littlefoot
thanxx for giving the link..i want to know about it but i m not getting the right forum where i could ask for it.
i have updated several rows on a table but i fail to update one row
SQL> select * from bookshelf;
TITLE AUTHORNAME CATEGORYNAME RATING
------------------------------ ------------------------- ------------ ----------
to kill a mocking bird harper lee adultfic 5
wonderfull life stephen jay gould adultnf 5
innumeracy john allen paulos adultnf 4
kierkegaard anthology robert bretall adultref 3
kierkegaard anthology soren kierkegaard
anne of green gables lucy maud montgomery childrenpic 1
good dog, carl alexandra day childrenfic 3
letters and papers from prison dietrich bonhoeffer adultnf 4
8 rows selected.
with regards
ashish
|
|
|
|
Re: unable to update table [message #200814 is a reply to message #200713] |
Wed, 01 November 2006 07:46 |
ashish_pass1
Messages: 114 Registered: August 2006 Location: delhi
|
Senior Member |
|
|
hello JRowbottom
this is my result what i get-
SQL> select * from bookshelf
2 ;
TITLE AUTHORNAME CATEGORYNAME RATING
------------------------------ ------------------------- ------------ ----------
to kill a mocking bird harper lee adultfic 5
wonderfull life stephen jay gould adultnf 5
innumeracy john allen paulos adultnf 4
kierkegaard anthology robert bretall adultref 3
kierkegaard anthology soren kierkegaard
anne of green gables lucy maud montgomery childrenpic 1
good dog, carl alexandra day childrenfic 3
letters and papers from prison dietrich bonhoeffer adultnf 4
8 rows selected.
SQL> select * from bookshelf
2 where authorname='soren kierkegaard';
no rows selected
SQL> select * from bookshelf
2 where authorname='harper lee';
TITLE AUTHORNAME CATEGORYNAME RATING
------------------------------ ------------------------- ------------ ----------
to kill a mocking bird harper lee adultfic 5
regards
ashish
|
|
|
|
|
|
|