Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SELECT DISTINCT and Insert. Interesting question
Hi,
Here is an interesting question seeking for expert's advice.
SELECT DISTINCT f1, f2, f3 ...
INTO v1, v2, v3....
FROM t1, t2....
WHERE t1.f1 = t2.f1 ....
ORDER BY t1.f1;
Now I'm trying dump the result into a Temporary table [has only one coulmn varchar2(255)] like:
INSERT INTO temp_table(f1) values (v1 || v2 || v3....)
If the 'f1' in 'temp_table' is the Primary Key, I'm getting Unique Constraint error. I was expecting the SELECT DISTINCT to return unique row.
Any clue what am I doing wrong here.
Appreciate your valuable time.
Srini. Received on Wed Nov 06 2002 - 11:11:19 CST
![]() |
![]() |