Is it possible to write a T-SQL query that goes through another table and pulls out a field that is the name of a table and another field that is the name of a field and then query for that?
I'm not explaining so well, sorry. I have a table that has id, tablename, field.
I want, for every record in this table, to create a query that will run to the table and get the value. But it's all dynamic because the table name will be changing as will the field names. Can this be done? How?
I'm not explaining so well, sorry. I have a table that has id, tablename, field.
I want, for every record in this table, to create a query that will run to the table and get the value. But it's all dynamic because the table name will be changing as will the field names. Can this be done? How?