SQL Server using wildcard within IN
How about: WHERE LEFT(job_no, 4) IN (‘0711’, ‘0712’, …)
How about: WHERE LEFT(job_no, 4) IN (‘0711’, ‘0712’, …)
I think you may be looking for function FIELD — while normally thought of as a string function, it works fine for numbers, too! ORDER BY FIELD(field_name, 3,2,5,7,8,1)