K, here's the deal. On my SQL database I have 2 tables. I want to get data something like this:
SQL db Stored Procedure (since I can't do a view with a query.)
Access table:
The variable in both queries is the same value. The customer ID value. The SQL query is pretty big, so I would like it to do the work on the SQL server, not the access DB. I had tried it with a Link table in the ACCESS table and building the query in ACCESS, which works, but is very slow! I would rather the ACCESS DB do as little work as possible. But the ACCESS tables are the real Parent here. Any ideas? Help?
SQL db Stored Procedure (since I can't do a view with a query.)
Code:
SELECT sqltable1.Field1, sqltable1.Field2, sqltable1.Field3
FROM sqltable1 INNER JOIN sqltable2 ON sqltable1.Field1 = sqltable2.Field1
WHERE sqltable2.Field2 = @Variable
Access table:
Code:
SELECT accTable1.Field1, accTable1.Field2, accTable1.Field3, sqlQuery.Field3
FROM sqlQuery INNER JOIN accTable1 ON (sqlQuery.Field1 = accTable.Field4) AND (sqlQuery.Field2 = accTable.Field5)
WHERE accTable.Field6 = ?Variable
The variable in both queries is the same value. The customer ID value. The SQL query is pretty big, so I would like it to do the work on the SQL server, not the access DB. I had tried it with a Link table in the ACCESS table and building the query in ACCESS, which works, but is very slow! I would rather the ACCESS DB do as little work as possible. But the ACCESS tables are the real Parent here. Any ideas? Help?