I'm using the following query to find all the catagories in a table that start with a certain letter :-

SELECT distinct CATEGORY
FROM dbo.mainfile
where CATEGORY like 'P%'
order by CATEGORY ASC

I have an index based on Category but it runs slow (it's a v. large table - and it't can't be redesigned). Any suggestions for a better query to get the results ? - btw I'm very much a SQL novice

Cheers

Richard


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to