I am trying to figure out how how I can configure the parameters in my where clause for my query to receive a list of the Skus to evaluate in the sorting.
I know I need to work on my ranking too, but I think I can get that easy enough.
select
rank() over (partition by Line order by Net desc, Sku) as LineRank, Sku, Net, Scrap
from myTable
where Sku in ( )
group by Line
If I have like 20 skus, I don't want to do a big case statement.
I am seeing some different implementations online, but none are really the thing.
I thought maybe I could pass a byte array that gets set from an expression tag binding.
You should never use queryString parameters with user input. You can sanitize your dropdowns with indirection, but any text search fields are a security breach waiting to happen.
If scripting, construct "Prep" queries with the correct number of question marks and make sure your argument list matches. If not scripting, reconsider.
I will probably use @zacht's example code in a script.
Before I get my list of Skus to get ranks though:
What would be a good component to let users efficiently pick which of 20 Skus they wanted to utilize in the query?
I think clicking on 20 radial dials or check boxes would be terrible.
I would like to have maybe a drag selection maybe if possible, so maybe a user could draw a box around some to add to the current list.
Or maybe I can have them in a table that they can click and drag on that I could color, is that doable?