Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

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
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page