Insert Query

Insert Query

 

  

While executing the following command (to insert records from old table to
new table)

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
insert into RACTUSER.RACT_CUSTOMER_MST_1 (RELATIONSHIP_NUMBER,
LOAN_ACCOUNT_NO, CUST_NAME, PRODUCT_CODE, ADDRESS1,
ADDRESS2, ADDRESS3, ADDRESS4, CITY )
VALUES
(select RELATIONSHIP_NUMBER, LOAN_ACCOUNT_NO, LAST_NAME, PRODUCT_CODE,
ADDRESS1, ADDRESS2, ADDRESS3,
ADDRESS4, CITY FROM RACTUSER.RACT_CUSTOMER_MST
WHERE RELATIONSHIP_NUMBER='AAAAAAAAAAAAAAAAAAA')

getting an error
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL0412N Multiple columns are returned from a subquery that is
allowed only one column.

Explanation:

In the context of the SQL statement, a fullselect is specified
that can have only one column as a result.


Can anybody help me on this?

Regards,
Rekha
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you



DB2 & UDB email list listserv db2-l LazyDBA home page