Solved

how to use with index query hint in SQL Server Joins

Posted on 2010-08-18
3
362 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
  • 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

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

Suggested Solutions

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now