If you have table employee with the following fields and data :
empno name address
------------------------------------------------
0001 Erik Bergen
0002 Lise Oslo
and what I want is the result :
Insert into employee values ('0001','Erik','Bergen');
Insert into employee values ('0002','Lise','Oslo');
You will get what you want.
Frank wrote in message <70313m$f...@news.acns.nwu.edu>...
SELECT 'INSERT INTO EMPLOYEE VALUES (',
EMPNO, ', '''
||NAME||''', '''
||ADDRESS||''' );'
FROM EMPLOYEE;
The results of executing this sql would be:
INSERT INTO EMPLOYEE VALUES ( 1 , 'ERIK ', 'BERGEN ' );
INSERT INTO EMPLOYEE VALUES ( 2 , 'LISE ', 'OSLO ' );
I would have defined empno as numeric therefore the surrounding quotes
are not needed in the INSERT statement.
Good luck,
Duane
SELECT 'Insert into employee(', empno, ',', name, ',', address ')'
to get the example statement you wrote only without the apostrophes
that delimit the strings (because I don't know how to escape then in
SQL)
Chau
Juan Lanus