Ok lets see if I can explain.
I want to make a query that will set criteria based upon entries in a table. So, let me give you some data to play with.
Table1 - field1, field2
row1 - l2a1234, Y
row2 - l2a2345, Y
row3 - l2a3456, M
row4 - l2a4567, N
Table2 - field1, field2, field3
row1 - "Y", "table1", "field2"
row2 - "N", "table1", "field2"
Output:
row1 - l2a1234, Y
row2 - l2a2345, Y
row4 - l2a4567, N
Normal SQL for Table1 to provide Output is:
SELECT field1, field2, field3 FROM Table1 WHERE field1 = "Y" OR "N";
But what I want is the ability to look into Table2 and see that I need to select all data that matches entries in table1.field2. So since table2 has "Y" and "N" then I need to find all entries in Table1 that are "Y" or "N."
Is this possible? This is the easy version, I'm really trying to build a single location to view what is included or excluded in a database.
I want to make a query that will set criteria based upon entries in a table. So, let me give you some data to play with.
Table1 - field1, field2
row1 - l2a1234, Y
row2 - l2a2345, Y
row3 - l2a3456, M
row4 - l2a4567, N
Table2 - field1, field2, field3
row1 - "Y", "table1", "field2"
row2 - "N", "table1", "field2"
Output:
row1 - l2a1234, Y
row2 - l2a2345, Y
row4 - l2a4567, N
Normal SQL for Table1 to provide Output is:
SELECT field1, field2, field3 FROM Table1 WHERE field1 = "Y" OR "N";
But what I want is the ability to look into Table2 and see that I need to select all data that matches entries in table1.field2. So since table2 has "Y" and "N" then I need to find all entries in Table1 that are "Y" or "N."
Is this possible? This is the easy version, I'm really trying to build a single location to view what is included or excluded in a database.