Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hello,

I'm trying to synchronise between en existing remote database to/from a consolidated (central) database. The table I'm trying to synchronise is a 'Download To Remote Only' mapping and has a custom query for the 'download_cursor' event. The custom query contains a join to a different table and selects a field (formno) from that table.

My mappings: alt text

Remote table: alt text

So in my situation: How do I map a column that doesn't exist on my consolidated table (but I get the column from my custom query) to my remote table? I don't see the option to add a custom column to the table mapping.

Thank you

asked 12 Sep '17, 04:36

erzgqdsg's gravatar image

erzgqdsg
26115
accept rate: 0%

edited 02 Apr '21, 05:46


Note that the table and column mapping UI is for you to provide the information needed for generating synchronization scripts. Since you are already using a custom download_cursor synchronization script you don't need to generate one, and thus you don't need to set up that column mapping in the UI.

If you are wondering why the "Custom" option is grayed in the pop-up menu in your screenshot, that is because those options are only applicable to uploads (eg. if you have consolidated column that isn't in the remote table).

permanent link

answered 12 Sep '17, 16:48

Graham%20Hurst's gravatar image

Graham Hurst
2.7k11843
accept rate: 29%

Hi, Thanks for the reply!

When I don't add any mappings there is no option to specify a download_cursor. When I add the mappings for a couple of columns but I ignore it, on synchronising I get the exception 'Server error: Message: Expecting 17 columns in cursor, but found 18. Table Name: OrderLine'.

Am I missing something here?

(13 Sep '17, 02:56) erzgqdsg

Hi Schoof

I think the following will work but I have not tried it:

  1. At the top of the window select the appropriate table mapping.
  2. In the bottom section, select the Download Strategy tab. On the tab set the strategy to Custom.
  3. At the top of the window select the Events tab. At the top right of the tab, select "download_cursor" in the event drop down.
  4. Write your download_cursor and if required your download_delete_cursor.

That's all. You should be able to ignore the column mappings page

Hope that works for you

Dave

permanent link

answered 12 Sep '17, 16:51

Dave%20Wellstood's gravatar image

Dave Wellstood
2262410
accept rate: 0%

Hi Dave, Thanks for the answer.

That's what I tried to do initially, I tried to ignore the column mappings but when I try to synchronise I get the exception 'Server error: Message: Expecting 17 columns in cursor, but found 18. Table Name: OrderLine'.

And I thought this was because I have 17 columns mapped in the column mapping. I also tried to unmap them all but then I get the exception that my primary key is not mapped.

(13 Sep '17, 02:44) erzgqdsg
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×371
×260

question asked: 12 Sep '17, 04:36

question was seen: 1,856 times

last updated: 02 Apr '21, 05:46