Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL query
Try this:
insert into USERICONS(usercode,sequenceno,bitmapint,trancode,description) select(select usercode from USERROLES where rolecode = 'ST') usercode,sequenceno,bitmapint,trancode,description from USERICONS where usercode = 'st'
Note: I have not tried this use of an inline subquery, so this is a 'theorectical' solution....please test on non-important data ----
Perhaps Tom Kyte will respond with a better way....
gcb45_at_dial.pipex.com wrote:
--------------snip-------------------------------
>I have a user called 'st' which has 19 icons. I would like to be able
>to give all users with the rolecode ST the same icons that 'st' has.
>This is where I hit a problem.
>
>If there was one user I would use the following SQL:
>insert into usericons (usercode, sequenceno, bitmapint, trancode,
>description)
>(select '&usercode', sequenceno, bitmapint, trancode, description
>from USERICONS
>where usercode = 'st');
>
----------------------snip----------------------
To reply please remove the 'nospam' part of the address Received on Thu Apr 08 1999 - 13:19:26 CDT
![]() |
![]() |