Solved

ODBC and Union Queries

Posted on 2001-07-23
9
596 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
9 Comments
 
LVL 8

Expert Comment

by:dovholuk
Comment Utility
-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
Comment Utility
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
Comment Utility
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 8

Expert Comment

by:dovholuk
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Author Comment

by:Uziel
Comment Utility
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 83 total points
Comment Utility
Just change the query typr to pass thru from the query menu and selecting SQL specific .
0
 
LVL 8

Expert Comment

by:dovholuk
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now