SQL Server thread issue and long running query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a SELECT INTO query that runs in Access utilizing SQL Server Tables
and ODBC. We changed the Access query so that it is Appending into a Table.
When we rip this query out of Access and run it in Query Analyzer, it returns
7,000+ rows in 30 seconds. However, when we run this query in Access, it is
taking 10 minutes.

We have checked the Tamp folders and all is clean.

Can anyone help here???

Thanks in advance!

wnfisba
 
The data you are appending in the table, do you filter this table? and the
7000 records are the resault of the filter.

In that case you can create a PassThrough query to return the records from
the SQL, and then create the insert query using the OutPut of the
PassThrough query.
 
Yes, It's done in Access.
You create it in the MDB, a query, but it execute on the server, and it
return only the desired records.

Open a new query, from the MenuBar select Query > SQL sepecific >
PassThrough query.
Type the SQL the same as you typed in the Query Analayser, remember that it
runs on the server so some things that you can use in Access you can't use on
the SQL server (such as: IIf , you use CASE instead).
Also the table must be located on the server, you can't use the SQL with
local tables in the MDB.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top