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

Home -> Community -> Usenet -> c.d.o.server -> Use Inserted Script Values

Use Inserted Script Values

From: <sickobilly_at_gmx.de>
Date: 23 Nov 2006 02:13:46 -0800
Message-ID: <1164276825.950425.286990@h54g2000cwb.googlegroups.com>


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 Received on Thu Nov 23 2006 - 04:13:46 CST

Original text of this message

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