Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Update ALL colums without knowing their name??-correction

RE: Update ALL colums without knowing their name??-correction

From: jaimin <jaimin_at_rolta.com>
Date: Tue, 24 Jul 2001 22:33:44 -0700
Message-ID: <F001.00354167.20010724223522@fatcity.com>

<SPAN

class=044503405-25072001>Hi,
<SPAN

class=044503405-25072001> 
<SPAN

class=044503405-25072001>    I don't know whether this will serve your needs !!!!!
<SPAN

class=044503405-25072001> 
If you
are using oracle8i then you can make relation between this two tables by adding common column.
<SPAN

class=044503405-25072001> 
And
then giving statement (ex/ new_columns is the column relating two tables)
<SPAN

class=044503405-25072001> 
<FONT

size=2>Update Table1 a set a.Every_columns = ( Select b.Every_columns from Table2 where a.new_columns=b.new_columns ) where a.new_columns=(select b.new_columns  from Table2 where a.new_columns=b.new_columns .
<SPAN

class=044503405-25072001> 
Then
dropping that column named new_columns.
<SPAN

class=044503405-25072001> 
I
don't know how You can make a procedure with this?????????
<SPAN

class=044503405-25072001> 
<SPAN

class=044503405-25072001> 
<SPAN

class=044503405-25072001>BFN.
<SPAN

class=044503405-25072001>Jaimin.
<SPAN

class=044503405-25072001> 

  <FONT face=Tahoma
  size=2>-----Original Message-----From: root_at_fatcity.com   [mailto:root_at_fatcity.com]On Behalf Of Csillag ZsoltSent:   Wednesday, July 25, 2001 1:06 AMTo: Multiple recipients of list   ORACLE-LSubject: RE: Update ALL colums without knowing their   name??-correctionHi,Thank you for your   answer.Unfortunatelly I can't truncate, then insert into ... select (   I myself thought about it before )becausethe tables are always used (   there are always a few users connecting to database).Thank   youZsolt Csillag HungaryAt 13:52 2001.07.23. -0800, you   wrote:
  Are you just trying to
    totally refresh table1 from table 2? how     about: 1.  TRUNCATE table1;
    2.  INSERT INTO table1 SELECT * FROM     table2;   (assuming structures of the two     tables are compatible) Or am I just totally     missing the mark in what you are looking to do? <FONT     size=2>Jon jcb_at_netsec.net <FONT
    size=2>-----Original Message----- From: Csillag     Zsolt [<A
    href="mailto:starsoft_at_interware.hu">mailto:starsoft_at_interware.hu]     Sent: Monday, July 23, 2001 5:33 PM <FONT     size=2>To: Multiple recipients of list ORACLE-L <FONT     size=2>Subject: Update ALL colums without knowing their name??     Hi, I need an
    universal update procedure in which I don' t know the colums name.     How can I make an update like this:     Update Table1 set Every_columns = ( Select * from     Table2) I tried set Table1.* wiht no     result. How can I work around this?   

  Csillag Zsolt<A href="http://www.star-soft.hu/"   eudora="autourl">www.star-soft.hu Received on Wed Jul 25 2001 - 00:33:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US