| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Use Inserted Script Values
sickobilly_at_gmx.de wrote:
> Hi!
> I am new in this Group. I am a student and I am getting started with
> ORACLE and Isqlplus,
> so please excuse if this question is strange in some kind of way...
>
> I want to CONCATENATE two Strings, which I have inserted to a table.
> How can I use he Strings, I have inserted (e.g.: &name) ?
>
> I have to create a userid which is the first letter of the first name
> and the first seven Letters of the last name. Everything has to be
> inserted into the my_employee table.
> Here is the first INSERT I wrote:
>
> INSERT INTO my_employee (ID,last_name,first_name,userid,salary)
> VALUES (&IDnr,'&Nachname' ,'&Vorname',
> (SUBSTR(Vorname,1,1))||(SUBSTR(Nachname,1,7)) ,&Gehalt);
>
> The following Error appears:
> (SUBSTR(Vorname,1,1))||(SUBSTR(Nachname,1,7)) ,5678)
> *
> ERROR at line 3:
> ORA-00984: column not allowed here
>
> Why can I use the column "Vorname" but can't use the second column
> "Nachname"?
> How can I use those Values I have inserted with "&value" ?
>
> Thank you for your time and answer.
> Christopher
>
> P.S: I use an Oracle Online Workspace. Release 10.2
Try
(SUBSTR('&Vorname',1,1))||(SUBSTR('&Nachname',1,7))
HTH, Seve Received on Thu Nov 23 2006 - 09:39:40 CST
![]() |
![]() |