Need ESQL/C Help
Posted in 1992
Path: emory!wupost!spool.mu.edu!agate!tfs.com!tfs.com!gregf
From: gregf@ts2.tfs.com (Greg Faulk)
Newsgroups: comp.databases,comp.databases.informix
Message-ID: <1992Jan30.215429.27062@tfs.com>
Date: 30 Jan 92 21:54:29 GMT
Sender: gregf@tfs.com (Greg Faulk)
Organization: TRW Financial Systems, Berkeley, CA - 94704
I am writting a generic table distribution facility that will
transfer the contents of specified tables to other databases that will
reside on different hosts.
However, the following ESQL/C code:
$database sourceDB@o_dallas;
$insert into destDB@o_dallas:tableName
select * from sourceDB@o_dallas:tableName;
produces this error:
360: Cannot modify table or view used in subquery.
If the destDB is made the current database the code works:
$database destDB@o_dallas;
$insert into destDB@o_dallas:tableName
select * from sourceDB@o_dallas:tableName;
And if the current database is not involved in the transaction it
also works:
$database uninvolvedDB@o_dallas;
$insert into destDB@o_dallas:tableName
select * from sourceDB@o_dallas:tableName;
This occurs on a Sun 690 running SUNOS 4.1.2. We are using Informix
OnLine Version 5.00.UC1B1 with Informix-Star.
Any help on resolving this problem will be greatly appreciated.
--
-----------------------------------------------------------------
Greg C. Faulk Internet: gregf@tfs.com
TRW Financial Systems tfs!gregf@sun.com
1000 Broadway St. Phone: (510) 704-3655