I work with SQL Server 2014 I have the need to obtain data from two tables for that I can do a INNER JOIN
detail is that when I do this query.
I need to use EspecificacionId
to be able to do another INNER JOIN
in my Options table.
But the issue is that I must take the values that I have EspecificacionId
in that query, it has two Specifications, the taking is dynamically, that means that I must use both in this case, but going through and taking the values and then go to the Options table. How can I do it? .
My idea would be to go through the result of the returned query through a foreach or for and take the data from SpecificationId to save it in an array and with those results do INNER JOIN
all that in the Options table in SQL Server.
Cheers!
As I see it, what you need is to reach the third table [Options] by matching the first 2 tables, you can do the following:
This brings you to the extended Options table, and you might have the columns you need.