This is a discussion on Rows Data within the Oracle Database forums, part of the Database Server Software category; --> Hello, Knows anybody how i can move data from a row to another row in the same table? row ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| "David" <dacon@medinet-igd.com> wrote in message news:c7nqnc$i8t$1@nsnmpen3-gest.nuria.telefonica-data.net... > Hello, > > Knows anybody how i can move data from a row to another row in the same > table? > > row A Data > 1 > 2 > 3 > .... > > Move to row B (empy) > > I think that I can rename the rows, how i can do it? > > I'm using Oracle 8.1.7 > > Thanks in advance. > > David > > David, I am confused by your use of the term, 'ROW': especially in regards to renaming and moving data between them. According to the Glossary of the "Oracle 10G Database Concepts" manual, a row is "Set of attributes or values pertaining to one entity or record in a table. A row is a collection of column information corresponding to a single record." (Glossary-17). I can uniquely identify a row by adding the primary key constraint to the table. If that is what you mean by naming, then you would the UPDATE statement to change the primary key value. Douglas Hawthorne |
| |||
| David wrote: > Hello, > > Knows anybody how i can move data from a row to another row in the same > table? > > row A Data > 1 > 2 > 3 > .... > > Move to row B (empy) > > I think that I can rename the rows, how i can do it? > > I'm using Oracle 8.1.7 > > Thanks in advance. > > David http://www.psoug.org/reference/update.html May help. -- Daniel Morgan http://www.outreach.washington.edu/e...ad/oad_crs.asp http://www.outreach.washington.edu/e...oa/aoa_crs.asp damorgan@x.washington.edu (replace 'x' with a 'u' to reply) |
| |||
| thank for your answer. I use UPDATE <table_name> SET <A> = ( SELECT <B> FROM <table_name>); but gives an error: "Not a valid use for a LONG camp ". A = LONG B = CLOB How I can do it ? Can I transform A type, after update the rows, and finally change it to LONG ? Thanks David "Daniel Morgan" <damorgan@x.washington.edu> escribió en el mensaje news:1084196474.529891@yasure... > David wrote: > > > Hello, > > > > Knows anybody how i can move data from a row to another row in the same > > table? > > > > row A Data > > 1 > > 2 > > 3 > > .... > > > > Move to row B (empy) > > > > I think that I can rename the rows, how i can do it? > > > > I'm using Oracle 8.1.7 > > > > Thanks in advance. > > > > David > > http://www.psoug.org/reference/update.html > > May help. > > -- > Daniel Morgan > http://www.outreach.washington.edu/e...ad/oad_crs.asp > http://www.outreach.washington.edu/e...oa/aoa_crs.asp > damorgan@x.washington.edu > (replace 'x' with a 'u' to reply) > |
| ||||
| David wrote: > > thank for your answer. > > I use > > UPDATE <table_name> > SET <A> = ( > SELECT <B> > FROM <table_name>); > > but gives an error: "Not a valid use for a LONG camp ". > > A = LONG > B = CLOB > > How I can do it ? > Can I transform A type, after update the rows, and finally change it to LONG > ? Try the following: UPDATE <table_name> SET A = ( SELECT TO_LOB(B) FROM <table_name>); HTH, Brian -- ================================================== ================= Brian Peasland dba@remove_spam.peasland.com Remove the "remove_spam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" |
| Thread Tools | |
| Display Modes | |
|
|