Hey guys,
need your briliant minds, sadly i dont have one 🙁 and sorry for the confused title.
ok i have a select statement like:
select OrderID, customer name, blah blah
from dbo.orders
however i am using this select statement in BIML, but dont let that throw anyone off, i am trying to say:
select *
from dbo.orders
where orders in
(
select name
from sys.tables
where name like 'orders'
)
therefore it will complete the select statement, however if it wasnt an order table, then skip the select statement, i am really sorry if i am not explaining it right, but that is what i can think on top of my head how i can accomplish my task that BIML requires.
what the main purpose is to dynamically do select statements for only certain tables in a database, if it meets my criteria, then do the select statement, if not, skip it.... is this possible?
thanks in advance