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

I need to query a MSSQL 2008 db for 4 columns of data where one column (an ID) is used to join a number of tables from a Sybase ASE 15 database then output all 4 columns from the SQL query with a number of columns from 5 other tables in Sybase.

Currently we query SQL and output to a csv, then load that data to an Access db. Then use that to Access table to query the Sybase tables using a join on the ID from the SQL query. I need to take Access out of the equation and have all this run either in MSSQL or Sybase and have that triggered by a SSRS report to display the final Sybase query in a SSRS report.

I am able to make a linked server from SQL to Sybase or vise versa, and am able to use openquery from SQL to query Sybase. How do I use my results from the SQL side to then query the Sybase side, I need the small subset of IDs from the SQL query to pull from the Sybase tables but cannot seem to get the SQL results to the Sybase side in a temp table or anything to then query from Sybase with the openquery call.

Is my only option to use a SQL bcp command to output the query to a csv file then use a separate bcp (Sybase version) to load the SQL csv to Sybase then return the results? If so how can that be done from SSRS? What are my options here, am I missing an opportunity?!

asked 24 Jul '17, 11:09

snowfun87's gravatar image

accept rate: 0%

closed 24 Jul '17, 15:09

Mark%20Culp's gravatar image

Mark Culp

The question has been closed for the following reason "Question is off-topic or not relevant" by Mark Culp 24 Jul '17, 15:08

This forum is about SQL Anywhere, not ASE (nor MySQL or MSSQL). As mentioned in the FAQ, you should ask your question on the ASE Forum.

permanent link

answered 24 Jul '17, 15:08

Mark%20Culp's gravatar image

Mark Culp
accept rate: 41%

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]( "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: 24 Jul '17, 11:09

question was seen: 2,269 times

last updated: 24 Jul '17, 15:09