I have a table like below
Board Component Cost
b1 c1 5
b1 c2 10
b2 c3 15
b3 c4 20
b3 c5 25
b4 C6 25
---------------------
100%
I shoud give the input to get the values from the table, say…
If the input is 20%
the output should be
Board Component Cost
b1 c1 5
b1 c2 10
b2 c3 15
If the input is 50%
the output should be
Board Component Cost
b1 c1 5
b1 c2 10
b2 c3 15
b3 c4 20
and so on
How to write the query in sql server
1 Answer