Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
How to separate attribute from incoming sql query.I want to get separate attribute from an in query. for example when any one search data like "select nokia mobile prize between 2000 to 10000" In this query I want to separate all the attribute to apply index on one of them. I use sql server profiler to get query workload from incoming query
Posted

1 solution

Hi,

SQL
DECLARE @Param1 BIGINT

SET @Param1 = 45;

SELECT Col1 FROM Table1 WHERE YourParam1 = @Param1


You can also have a look at Stored Procedures.

Hope it helps!
 
Share this answer
 
Comments
maheshpardeshi 29-Aug-11 10:30am    
but how this will separate the attribute from query
_Zorro_ 30-Aug-11 4:01am    
I seem to have misunderstood your question here…
What do you mean by attributes? I thought you wanted to manage your query parameters separately.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900