• As Rafael stated:

    rafael lenartowicz (4/5/2007)


    if you're using OPENQUERY you are executing the SQL "inside" of the AS/400. AS400.S1019865.NSCDEVDATA.WSZZP100 doesn't exist in the AS/400 world. Try this :

    Select * from OPENQUERY(AS400, 'UPDATE NSCDEVDATA/WSZZP100 SET ZZSSRV = ''2006-02-08 09:00:19'' ')

    :: ::

    In other words, AS400 is a SQL object, not an AS400/DB2 object.

    If you are updating large amounts of data, you may want to use a DTS package or VBScript to call a procedure on the AS400. One test analysis I conducted, deletes always took around 50 minutes to complete; the inserts 6 to 10 minutes. This was with only 85,000 records where a DTS call would take seconds or less.

    Note, too, that if your trigger is using variables to create the statement you will need to encapsulate them in a variant string and execute them that way. OpenQuery does not accept variables. I've also never needed to use the parentheses around the update value.

    See some other info on this subject at http://sqlforums.windowsitpro.com/web/forum/messageview.aspx?catid=65&threadid=47240&STARTPAGE=1

    My unrelated 2¢ worth: select(1) is more efficient than select(*).