I need to take some data from Table A, use some logic, and then insert one or more rows into Table B. I have a PLSQL block that brings in data from Table A with a cursor, performs all the logic required, and inserts the required rows.
The problem is there are duplicate rows in Table B - it's the nature of the beast. But I need the final result to be a Table B with no duplicates.
It's Oracle so temporary tables are bad form - what's the best way to accomplish this?
SELECT * BULK COLLECT
to write a query that filters out duplicates... it might depend on the nature and structure of your data as well, but it might work. – FrustratedWithFormsDesigner Mar 12 at 15:45INSERT INTO MYTABLEB ( SELECT DISTINCT ...... FROM MYTABLEA )
– Phil Mar 12 at 15:52