Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: insert subquery problems
If the column_b is defined on table_a, try
insert into table_a
(column_a,column_b,column_c)
select table_b.column_a, 'column_b.string' as column_b, table_c.column_c
from table_b, table_c
where table_b_join = table_c_join
In article <7hpri8$u6o$1_at_nnrp1.deja.com>,
ddreams_at_my-dejanews.com wrote:
>
>
> Hi, I'm trying to do an insertion with a subquery but some of the
> columns I want returned from the subquery are static strings that I
keep
> elsewhere in my program... Basically I want to:
>
> insert into table_a(column_a,column_b,column_c)
> select table_b.column_a, 'column_b.string', table_c.column_c
> from table_b, table_c
> where table_b_join = table_c_join
>
> Ie, I can't get "column_b.string" out of a table anywhere, it's just a
> string passed as a parameter to my program... There must be an easy
way
> to do this that I'm overlooking, so any help is appreciated. I could
> insert that static string into a temporary table, but that's quite a
> kludge for a rather simple problem.....
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
>
--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Mon May 17 1999 - 17:08:15 CDT
![]() |
![]() |