Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating table in Dev DB copying data from Prod DB

652374Jan 12 2009 — edited Jan 12 2009
I am trying to create a table in development copying data from the production Database using below SQl but getting error at line No.1. Please help. Code is mentioned below.

COPY FROM READ/READ@PROD
REPLACE EMAIL_12012009
USING
select A.NAME,
B.ROLL_NO,
B.ADDRESS,
B.PIN_CODE,
C.EMAIL_ADDR,
C.CREATED,
C.last_upd,
C.last_upd_by,
C.PH_NUM,
C.FST_NAME,
C.LAST_NAME,
B.MASTER_OU_ID,
B.X_RETENTION_USER_ID
from lprd.S_PARTY A,
l_prd.S_EXT B,
l_prd.S_CONT C
WHERE A.PARTY_ID = B.ROW_ID
AND b.cust_stat_cd = 'Active'
AND A.PERSON_ID = C.ROW_ID
AND C.ROW_ID IN (SELECT distinct CON_ID As CONTACT_ID
from lPRD.S_SRV_REQ
where last_upd >= (SYSDATE -365)
UNION
select distinct CONTACT_ID from LPRD.CX_ORDER
where last_upd >= (SYSDATE -365)

Please help me to sort out the error as I am facing this error for the first time.
Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2009
Added on Jan 12 2009
8 comments
653 views