|
[oracle-l]
||
[Date Prev]
[01-2006 Date Index]
[Date Next]
||
[Thread Prev]
[01-2006 Thread Index]
[Thread Next]
simple(?) sql question
- From: Veres Lajos <vlajos@xxxxxxxxxxxxxx>
- To: oracle-l@xxxxxxxxxxxxx
- Date: Thu, 5 Jan 2006 11:11:49 +0100 (CET)
Hello,
I would like to copy a row in a table, and change some columns values
without knowing the exact structure of the table.
Something like:
insert into test select t.*,'val1' as col1,'val2' as col5 from test t where
col2='1';
But this doesnt works.
ORA-00913: too many values
The selects result give something like:
SQL> select t.*,'val1' as col1,'val2' as col5 from test t where col2='1';
col1 col2 col3 col4 col5 col1 col5
----- ----- ----- ----- ----- ---- ----
1 1 1 1 1 val1 val2
col1,col5 columns are duplicated.
There is any way to remove column(s) from '*', if it exists after
without hardcoding all columns names?
Or maybe other solution?
Thanks.
--
Veres Lajos
vlajos@xxxxxxxxxxxxxx
+36 20 438 5909
--
http://www.freelists.org/webpage/oracle-l
|