SQL query using variables

Hey guys, hope everyone is enjoying the holidays. quick question, so i’m trying something not sure if it will work but instead of having each OP send their end of the shift data(only one row of data with multiple columns of course) to a separate table, I’m sending them all(only 5 OPs) to one table.
Whats the best way to include a variable in a SQL query so I can change the OP name like this:

WHERE
       EOS_Name = 'Shift A' AND OP = '{Root Container.Dropdown 1.selectedStringValue}' 

In the table I have OP100 OP101… so based on string value of a drop down I like to query different columns but I’m not quite sure how to do that where my string is actually a variable coming from a dropdown string value. I remember back in my JAVA days working with DB I used

'"+variable+"'

to put a variable inside a query but that was MYSQL and this is MS SQL so wasn’t sure if there is a different method… Thanks in advance.

You’ve already got the right answer. :smiley:

I’ve got one open on my Designer now, doing exactly what you are wanting to do in MSSQL.

where Name = '{Root Container.Dropdown.selectedStringValue}' and SequenceDate = '{Line2/Run/Sequence Date}' 

haha, the thing is, tables are empty so i guess i couldn’t test it correctly :stuck_out_tongue:, well lesson learned… more testing before asking :smiley: