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

Home -> Community -> Usenet -> c.d.o.misc -> multiple insert with distinct in select

multiple insert with distinct in select

From: Wolfgang Dedden <Wolfgang.Dedden_at_t-online.de>
Date: 12 Nov 1998 22:45:18 GMT
Message-ID: <72fodu$5o9$1@news00.btx.dtag.de>

Hi,

i have a problem that i can't solve.

Here my sql-script:

PROMPT
PROMPT Grafik einer Gruppe zuordnen
PROMPT
PROMPT Bitte geben Sie einen Grafiknamen an. ACCEPT TAGNAME CHAR PROMPT 'GRAFIKNAME : ' PROMPT
PROMPT Bitte geben Sie die Gruppe an (OPERATOR / SUPERVISOR / ENGINEER). ACCEPT GRPNAME CHAR PROMPT 'GRUPPE : ' insert into USERTABLE
 (USERNAME, PASSWORD, ACCESSAUTHORITY, ACCESSKEYREQUIRED,   ENVNAME,RECORDTYPE, TYPENAME, ACCESSKEYREQD)  select distinct USERNAME, PASSWORD, ACCESSAUTHORITY, ACCESSKEYREQUIRED,

                 'VSB', 'g', '&TAGNAME', ACCESSKEYREQD from USERTABLE M1
 where M1.ACCESSAUTHORITY = '&GRPNAME' AND M1.ENVNAME = 'VSB';

The select without insort into will show the correct count of rows. The select without distinct keyword will insert for each Tableentry a new entry.

But the script is shown above only will show the result of the select. No new row will be inserted in the table.

Where is my mistake?

If you have any idea, please send me an e-mail to Wolfgang.Dedden_at_t-online.de

In hope for results
Wolfgang Received on Thu Nov 12 1998 - 16:45:18 CST

Original text of this message

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