Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

SQL Server thread issue and long running query

Discussion in 'Information Technology' started by wnfisba, Jul 28, 2006.

  1. wnfisba

    wnfisba
    Expand Collapse
    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
     
  2. Loading...


  3. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    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.


    --
    Good Luck
    BS"D


    "wnfisba" wrote:

    > 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
     
  4. wnfisba

    wnfisba
    Expand Collapse
    Guest

    How would I go about creating a "PassThrough" query??? Is that done in
    Access???

    "Ofer Cohen" wrote:

    > 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.
    >
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "wnfisba" wrote:
    >
    > > 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
     
  5. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    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.


    --
    Good Luck
    BS"D


    "wnfisba" wrote:

    > How would I go about creating a "PassThrough" query??? Is that done in
    > Access???
    >
    > "Ofer Cohen" wrote:
    >
    > > 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.
    > >
    > >
    > > --
    > > Good Luck
    > > BS"D
    > >
    > >
    > > "wnfisba" wrote:
    > >
    > > > 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
     

Share This Page