Hi felows,

I Have a script, collecting data from several tables, it takes long time to run, I created a single table that have just the information I need, I want to create a procedure, to run every day (with cron), to update this table.
This way above, works, I tested:
"insert into new_table (var1, var2,var3...) select var1, var2, var3... from other_table where..."
but I tried to do this using "on existing update" and the ISQL give me the error. "Remote server does not the ability to support this statement"
I couldn't find anything related on forums or Sybase KB.
There is some way to do what I want ?
Thanks a lot
Paulo Braga - Brazil

asked 10 Dec '20, 08:06

phbraga's gravatar image

accept rate: 0%

FWIW, the correct error text shoud be "Remote server does not have the ability to support this statement" (SQLCODE -706).

(10 Dec '20, 12:11) Volker Barth

AFAIK, the ON EXISTING clause does not work when the source table (SELECT FROM) or the destination table (INSERT INTO) are proxy tables, as documented here - although the documentation just mentions the destination table.

My typical workaround is a two-step approach:

  1. SELECT the proxy's table relevant contents into a local temporary table (so via the SELECT ... INTO LOCAL TEMPORARY TABLE... syntax)
  2. Use your original INSERT ... ON UPDATE... SELECT FROM LT..., i.e. selecting from the local temporary table from step 1. As the local temporary table and the destination table are both local, the ON UPDATE clause should work.
permanent link

answered 10 Dec '20, 11:35

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 10 Dec '20, 11:36

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 10 Dec '20, 08:06

question was seen: 167 times

last updated: 10 Dec '20, 12:11