Good afternoon,
I have a procedure that executes a select, but I work with a bitmap, where I use conditionals to perform a specific select depending on the bit that is passed as a parameter to the procedure. In this scenario I use a varchar variable to store the select statement to be executed, however it may happen that more than one bit is connected, so I perform a concatenation with the UNION operator to join other selects to one.
My question is this, if using a cursor to save the data instead of using concatenated strings, could it increase the performance of the procedure or bring the results faster than the current logic?
Thank you in advance.