try this ("(IDU + 1)"):
select 'insert into XXX (IDU,PEN_ID,LAST_ACCESS,FK_APPLICATION) values
(' || (IDU + 1)
||','||PEN_ID||',sysdate,'||FK_APPLICATION||');' from app_users
where pen_id in (44541,41402,41813) ;
HEheac> Hi,
HEheac> My brain is slow today.... Can someone help me ?
HEheac> I can do :
HEheac> select idu+1 from user_group_members where fk_user
HEheac> in(44541,41402,41813) ;
HEheac> IDU+1
HEheac> ----------
HEheac> 41411
HEheac> 41821
HEheac> 44546
HEheac> But I can't do :
HEheac> select 'insert into XXX (IDU,PEN_ID,LAST_ACCESS,FK_APPLICATION) values ('||IDU
+ 1 ||','||PEN_ID||',sysdate,'||FK_APPLICATION||');' from app_users
HEheac> where pen_id in (44541,41402,41813) ;
HEheac> I've got on IDU+1 :
HEheac> ERROR at line 1:
HEheac> ORA-01722: invalid number
HEheac> Best Regards
HEheac> Henrik
HEheac> --
HEheac> ---------------------------------------------------------------------------
HEheac> There's fun in being serious.
HEheac> -- Wynton Marsalis
HEheac> Henrik Ekenberg Anoto AB
HEheac> --
HEheac> Please see the official ORACLE-L FAQ: http://www.orafaq.net
Best regards,
Dmitrii
[EMAIL PROTECTED]
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Dmitrii CRETU
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).