ODBC Failed

aziz rasul

Active member
Local time
Today, 04:57
Joined
Jun 26, 2000
Messages
1,935
I have a colleague is having the following problem. She has an initial pass thru query. She now wants to run a second pass thru query using the first pass thru query. Here's the SQL code and the error message she's getting:

SELECT stgeorge.STG_outpatient_appointment.InternalNo, stgeorge.STG_outpatient_appointment.Clinic, stgeorge.STG_outpatient_appointment.EpisodeNo, stgeorge.STG_outpatient_appointment.OrderOfAttend, stgeorge.STG_outpatient_appointment.OrderOfAppoint, stgeorge.STG_outpatient_appointment.Disposal, stgeorge.STG_outpatient_appointment.ApptDate, stgeorge.STG_outpatient_appointment.AttendStat, stgeorge.STG_outpatient_appointment.ClinicSpecialty, stgeorge.STG_outpatient_appointment.PrimaryProc, stgeorge.STG_outpatient_appointment.ContractId
FROM stgeorge.a01_q, stgeorge.STG_outpatient_appointment
WHERE stgeorge.a01_q.InternalNo = stgeorge.STG_outpatient_appointment.InternalNo
AND stgeorge.a01_q.EpisodeNo = stgeorge.STG_outpatient_appointment.EpisodelNo

ODBC call failed.
[SYBASE][ODBC Sybase driver][SQL Server]stgeorge.a01_q not found. Specify owner.objectname or use sp_help to check whether the object exists ...

Any ideas anyone?
 
The pass thru query only excists in the Access DB, not in the SQL server.

You can use the original pass thru query but only inside access AND it will be teribly slow.
My advice: Re-write the second query to work without the actual first one.
 
Thanks for that. I think that's the best way forward. The db normally sits on a slow server. I have asked my colleague to place a copy of the db on her local machine and create an MS Access query which will, insha-allah run faster.
 
If your local machine is faster than a server.... that is either one busy server or... one hell of a desktop.
 
Copying over a lot of data is going to take a lot of time as well... and cause bloating of the DB.

So maybe it is better to run it on the server as well, unless you are making some user interface where time really matters.
 

Users who are viewing this thread

Back
Top Bottom