Remove the 'values' caluse and try again .....
insert into RACTUSER.RACT_CUSTOMER_MST_1 (RELATIONSHIP_NUMBER,
LOAN_ACCOUNT_NO, CUST_NAME, PRODUCT_CODE, ADDRESS1,
ADDRESS2, ADDRESS3, ADDRESS4, CITY )
(select RELATIONSHIP_NUMBER, LOAN_ACCOUNT_NO, LAST_NAME, PRODUCT_CODE,
ADDRESS1, ADDRESS2, ADDRESS3,
ADDRESS4, CITY FROM RACTUSER.RACT_CUSTOMER_MST
WHERE RELATIONSHIP_NUMBER='AAAAAAAAAAAAAAAAAAA')
Suresh.
"rekha" <db2udbdba-ezmlmshield-x4056510.[Email address protected]
07/28/2006 03:25 AM
To
"LazyDBA Discussion" <[Email address protected]
cc
Subject
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
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
CONFIDENTIALITY NOTICE:
This is a transmission from Kohl's Department Stores, Inc.
and may contain information which is confidential and proprietary.
If you are not the addressee, any disclosure, copying or distribution or use of the contents of this message is expressly prohibited.
If you have received this transmission in error, please destroy it and notify us immediately at 262-703-7000.
CAUTION:
Internet and e-mail communications are Kohl's property and Kohl's reserves the right to retrieve and read any message created, sent and received. Kohl's reserves the right to monitor messages by authorized Kohl's Associates at any time
without any further consent.
DB2 & UDB email list listserv db2-l LazyDBA home page