Solved

how to use with index query hint in SQL Server Joins

Posted on 2010-08-18
3
371 Views
Last Modified: 2012-05-10
Im tyring to use with index clause in SQL Server Joins but getting syntax errors. on SQL 2005

Can someone helpout with a sample
0
Comment
Question by:dba2dba
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33465029
select * from tbl with (index(indexname,index2name))
select * from tbl with (index(indexname))
select * from tbl t1 with (index(indexname)) inner join tbl2 .....

put the with(index()) next to the table after the alias
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33465052
http://msdn.microsoft.com/en-us/library/ms187373.aspx

section INDEX

INDEX ( index_value [ ,... n ] ) | INDEX = (index_value)
0
 
LVL 16

Accepted Solution

by:
vdr1620 earned 500 total points
ID: 33465171
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question