Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7825023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:48:24+00:00 2026-06-02T08:48:24+00:00

When I run this pass-through query from Microsoft Access that uses an odbc connection

  • 0

When I run this pass-through query from Microsoft Access that uses an odbc connection it works fine:

SELECT   b.PRODUCT, b.UPC_NBR, b.EAN_NBR, b.NAME AS ProductDescription, b.AUTHOR, 
     o.RETAILER, o.REFER_NBR, o.ARDESC, a.NAME, o.TRAN_DATE, 
     o.QTY, o.RETAIL, o.PRICE, o.COST

FROM    BOOK_MASTER_REC as b JOIN 
    ORBDETL_RECORD as o ON ISBN_TITLE = o.TITLE 
                 AND ISBN_PUBLISHER = o.BK_PUBL 
                 AND BOOK_GROUP = o.BK_GROUP  
                 AND BOOK_PREFIX = o.BK_PREFIX JOIN 
    ARDESC_RECORD as a ON o.ARDESC = a.ARDESC 

WHERE b.PRODUCT Between 600 And 698

When I run an identical query from SMSS that uses the same odbc connection via linked server it fails:

SELECT b.PRODUCT, b.UPC_NBR, b.EAN_NBR, b.NAME AS ProductDescription, b.AUTHOR, 
     o.RETAILER, o.REFER_NBR, o.ARDESC, a.NAME, o.TRAN_DATE, 
     o.QTY, o.RETAIL, o.PRICE, o.COST

FROM    DPS_GPR..root.BOOK_MASTER_REC as b INNER JOIN 
    DPS_GPR..root.ORBDETL_RECORD as o ON ISBN_TITLE = o.TITLE 
                         AND ISBN_PUBLISHER = o.BK_PUBL 
                         AND BOOK_GROUP = o.BK_GROUP  
                         AND BOOK_PREFIX = o.BK_PREFIX INNER JOIN 
    DPS_GPR..root.ARDESC_RECORD as a ON o.ARDESC = a.ARDESC 

WHERE b.PRODUCT Between 600 And 698

It gives the following error:

OLE DB provider “MSDASQL” for linked server “DPS_GPR” returned message
“[Transoft][TSODBC][usqlsd]’)’ expected here (FROM)”. Msg 7321, Level
16, State 2, Line 2 An error occurred while preparing the query
“SELECT
Col1061,Col1062,Col1064,Col1065,Col1066,Col1042,Col1048,Col1049,Col1050,Col1051,Col1052,Col1053,Col1054,Tbl1005.NAME
Col1040 FROM root.ARDESC_RECORD Tbl1005,(SELECT
Col1057,Col1058,Col1059,Col1060,Col1061,Col1062,Col1064,Col1065,Col1066,Tbl1003.RETAILER
Col1042,Tbl1003.BK_PREFIX Col1043,Tbl1003.BK_GROUP
Col1044,Tbl1003.BK_PUBL Col1045,Tbl1003.TITLE
Col1046,Tbl1003.REFER_NBR Col1048,Tbl1003.ARDESC
Col1049,Tbl1003.TRAN_DATE Col1050,Tbl1003.QTY Col1051,Tbl1003.RETAIL
Col1052,Tbl1003.PRICE Col1053,Tbl1003.COST
Col1054,Col1067,Col1063,Tbl1003.SEQ Col1047,Tbl1003.PROCESSED_FLAG
Col1055 FROM root.ORBDETL_RECORD Tbl1003,(SELECT Tbl1001.BOOK_PREFIX
Col1057,Tbl1001.BOOK_GROUP Col1058,Tbl1001.ISBN_PUBLISHER
Col1059,Tbl1001.ISBN_TITLE Col1060,Tbl1001.UPC_NBR
Col1061,Tbl1001.EAN_NBR Col1062,Tbl1001.NAME Col1064,Tbl1001.AUTHOR
Col1065,Tbl1001.PRODUCT Col1066,Tbl1001.CATEGORY9
Col1067,Tbl1001.BOOK_NUMBER Col1063 FROM root.BOOK_MASTER_REC Tbl1001
WHERE Tbl1001.PRODUCT>=(600.) AND Tbl1001.PRODUCT<=(698.)) Qry1068
WHERE Col1060=Tbl1003.TITLE AND Col1059=Tbl1003.BK_PUBL AND
Col1058=Tbl1003.BK_GROUP AND Col1057=Tbl1003.BK_PREFIX) Qry1069 WHERE
Col1049=Tbl1005.ARDESC” for execution against OLE DB provider
“MSDASQL” for linked server “DPS_GPR”.

I would appreciate any ideas as to how I might get this working through SQL Server as I’m trying to get away from MS Access.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:48:27+00:00Added an answer on June 2, 2026 at 8:48 am

    I was able to make this work by making it a pass-through query.

    SELECT * FROM OPENQUERY(DPS_GPR, 'select ... blah blah blah ...')
    

    Not as ideal of a solution as I was hoping for, but it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run this command : select * from LIST where JCODE = 8 and
I am running an SQL pass-through query in SAS. When I run it on
I run this in localhost and it works. In the server the PHP script
when I run this JS in FF or Safari it works just right but
if I run this under c# from p in Addresses where p.Address2 == null
When I run this code, About half-way through the concatenation loop, $xml becomes null
I have a query that seems to be returning the wrong data from the
How can I get this query to work where it goes through the checks
I have a for loop that I pass through ssh to a server that
I'm working on a project that requires me to run this code in java,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.