0

Is something like this possible in SQL/DB2?

INSERT INTO Prod.CD_Final (ID) 
VALUES (SELECT ID FROM Test.CD_Final);

I always get the error message:

"Prod.CD_Final" is an undefined name. SQL Code: -204, SQL State: 42704
"Test.CD_Final" is an undefined name. SQL Code: -204, SQL State: 42704

Thanks, Stefan

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Stefan
  • 21
  • 2
  • 4
  • I do that all the time on our DB2...are PROD and TEST your library names? Have you tried it with / instead of . between the names? – Leslie Oct 12 '10 at 17:48
  • What platform and version of DB2 are you using? – Ian Bjorhovde Oct 12 '10 at 18:07
  • I am not allowed to change any settings on the database. It runs on AIX. The main problem is, that the Prod and the Test databases are on different servers. – Stefan Oct 13 '10 at 13:56

1 Answers1

0

I think the two dbs need to be Federated I think. See here

Community
  • 1
  • 1
Preet Sangha
  • 64,563
  • 18
  • 145
  • 216