Unix Technical Forum

Rows Data

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 ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-23-2008, 09:11 AM
David
 
Posts: n/a
Default Rows Data

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-23-2008, 09:11 AM
Douglas Hawthorne
 
Posts: n/a
Default Re: Rows Data

"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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-23-2008, 09:12 AM
Daniel Morgan
 
Posts: n/a
Default Re: Rows Data

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)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-23-2008, 09:12 AM
David
 
Posts: n/a
Default Re: Rows Data

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)
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-23-2008, 09:12 AM
Brian Peasland
 
Posts: n/a
Default Re: Rows Data

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"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:49 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com