It seems netezza cross-database access is readonly: it won't work in insert, update, or delete statements.

At least that is what I conclude from this IBM doc page which says:

"You cannot use a cross-database INSERT, UPDATE, or DELETE statements to change a table in a different, remote, database. If you attempt a cross-database write operation, the system displays an error message.

For example:

DEV.DBUSER(DBUSER)=>INSERT INTO prod..emp SELECT * FROM newusers; Cross Database Access not supported for this type of command."

So I think you just have to remove the 'dbname.' part from the statement so that netezza won't think it is asked to do (illegal) cross database access.

update: (Having no Netezza here, I tried to recreate the error on Postgres (on which Netezza was based albeit a long time ago [1]). Postgres doesn't have cross-database access at all, not even readonly. Postgres still shows a similar error message when asked to access another database:

(Pg 9.5devel, HEAD dcbf5948e12a) $ psql -d testdb psql (9.5devel) Type "help" for help. testdb=# create table t(c text); CREATE TABLE testdb=# insert into t values ('value 1'); INSERT 0 1 testdb=# insert into test.public.t values ('value 3'); ERROR: cross-database references are not implemented: "test.public.t" LINE 1: insert into test.public.t values ('value 2');
[1] https://wiki.postgresql.org/wiki/PostgreSQL_derived_databases

)


In reply to Re: Cross Database Access not supported by erix
in thread Cross Database Access not supported by Bio_ftr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.