Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665

    Unanswered: Simple Query Hint Question

    I know this is a beginner question and Im a bit ashamed to even ask but....I need to know the syntax for a query hint. The help seems a bit confusing to me with all those brakects and squgily lines. Can some one give me a simple example of using a query hint?
    Jim

  2. #2
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    select count(*)
    from syscolumns
    group by id
    option (hash group)

  3. #3
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Originally posted by ispaleny
    select count(*)
    from syscolumns
    group by id
    option (hash group)
    Thanx for the fast reply man...one more fast question. The option command is it always after the group by or is it the last thing in the query. Im asking because I have a having clause, do I put the option clause before or after the having?
    Jim

  4. #4
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    The last command.
    Not so fast

  5. #5
    Join Date
    Aug 2002
    Location
    Charlotte NC
    Posts
    665
    Originally posted by ispaleny
    The last command.
    Not so fast
    Thanx for the help!!!
    Jim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •