I want to query a table like below.
The parameter @classval will have any class value
I want to do a T-sql for that.
Can anyb ody help me out what will be efficient way to do that.
Thought of doing some function with split but it performance is slow.
declare
@classval='Test1=2;Test3=1'
class Value
--------------------
Test1 3
Test2 12
Test3 2
....
.......
select * from table where
class=Test1 and value <=2
and class=Test3 and value <=1
......
......
......
The parameter @classval will have any class value
I want to do a T-sql for that.
Can anyb ody help me out what will be efficient way to do that.
Thought of doing some function with split but it performance is slow.
declare
@classval='Test1=2;Test3=1'
class Value
--------------------
Test1 3
Test2 12
Test3 2
....
.......
select * from table where
class=Test1 and value <=2
and class=Test3 and value <=1
......
......
......