SQL -> Progress db

  • I am not sure what the best forum is for my question, but here it is:

    If I am writing a SQL query (which will be invoked from a .Net program), calling upon a Progress db via an ODBC link, and I want to specify that the query use a non-primary key index on the Progress side, how can I do that in T-Sql?

    Thanks for all ideas and suggestions.

     

  • a better explanation of index hints than BOL supplies can be found here:

    http://www.sqlservercentral.com/columnists/rmarda/performanceaddinghints_printversion.asp

    it's bad to second guess SQL Server's abilities as far as deciding which index to use, but here is the syntax:

    SELECT *

    FROM authors WITH (INDEX(0))

     Using ID of 0 for the index ID will force SQL Server to perform a clustered index scan if a clustered index exists.  If there is no clustered index then a table scan will be done.

     Here is an example that uses an index name instead of an ID:

     USE pubs

     SELECT *

    FROM authors WITH (INDEX(aunmind))

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell,  thanks for your reply! I think that will help and I will pass along the suggestion to our Progress people. 

    One note: I was unable to get into the link you sent. I was able to find a list of "rmarda"'s articles but the one you quote isn't on that list.

  • i fat fingered the link and added a backslash..sorry.

    I edited the link and it does take me to the right spot now.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks again, Lowell. I found it now.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply