Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ODBC and Union Queries

Posted on 2001-07-23
9
Medium Priority
?
657 Views
Last Modified: 2008-02-01
Ok, I have 3 tables  1) New, 2) Current, and 3) History.  All 3 have identical data structures.  I am trying to do a Union query in Access, but I get the following error:

ODBC--call failed.
[Timberline][Timberline ODBC Dri(#0)[Timberline][Timberline ODBC Driver](#0)

The funny thing is I can get the query to work fine in Crystal Reports SQL Query Designer.  I have tried to restart everything, kicked everyone out of the DB, Refreshed the links to the Timberline tables, yet nothing works.  Any ideas?  Below is my code, notice how terribly basic it is...

SELECT *
FROM NEW_GLT_TRANSACTION

UNION SELECT *
FROM HISTORY_GLT_TRANSACTION
0
Comment
Question by:Uziel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 8

Expert Comment

by:dovholuk
ID: 6309499
-instead of using *, have you tried replacing it with the actual field names???
-i assume the ODBC driver is the "latest", correct?

just some thoughts...

dovholuk
0
 
LVL 1

Author Comment

by:Uziel
ID: 6309517
Yes, I started with just one field name and reverted to the * hoping it would alleviate any errors.

What is weird is that it DID work...once.  Then I started changing it to exactly what I wanted and stopped working.  It makes no sense.  Also, it does work in Crystal SQL, just not access.
0
 
LVL 1

Author Comment

by:Uziel
ID: 6309518
Yes, I started with just one field name and reverted to the * hoping it would alleviate any errors.

What is weird is that it DID work...once.  Then I started changing it to exactly what I wanted and stopped working.  It makes no sense.  Also, it does work in Crystal SQL, just not access.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:dovholuk
ID: 6309878
ok. we'll put it to the test then! :)

i am assuming that your query is based off of "linked" tables, right?  instead, use a passthrough query. passthrough queries are run DIRECTLY against the server with no (very little) Access manipulation.

if you need help with creating a passthrough query, let me know. otherwise, try that and see what happens.

dovholuk
0
 
LVL 1

Author Comment

by:Uziel
ID: 6309959
I've never done a pass through, and the documentation is not very good.  Any chance I could get an example to run off?  I'm assuming this will allow me to plug the information where I want it, but will it let me do a union as well?

Btw, thanks so much for the help.
0
 
LVL 6

Accepted Solution

by:
devtha earned 332 total points
ID: 6340673
Just change the query typr to pass thru from the query menu and selecting SQL specific .
0
 
LVL 8

Expert Comment

by:dovholuk
ID: 6341875
devtha is mostly correct. you need to be careful with your syntax when running a passthrough query as you will need to use ansi sql as opposed to access sql. so getting the syntax just right might take effort.

but to try it out, you create a new query. go to the query menu, choose "Sql specific" and then choose "pass-through".  you will be forced to TYPE in your sql, so as a trial try something like "SELECT * FROM SomeTableName" and then run the query to see if it works.

oh yes, union is an ansi sql command, so that should work fine...

good luck, let us know if you need any more help.

dovholuk
0
 

Expert Comment

by:amp072397
ID: 6784031
Uziel:

You have several open questions:

http://www.experts-exchange.com/jsp/qShow.jsp?qid=20155619
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20113753
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20104730

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
CS:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!


thanks!
amp
community support moderator

1/7
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6958395
Per recommendation, force-accepted by
Netminder
CS Moderator

dovholuk: points for you at http://www.experts-exchange.com/jsp/qShow.jsp?ta=msaccess&qid=20290223
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question