mary1994
Technical User
- Jan 10, 2009
- 9
The query below works correctly on a sample database with fewer records but on the production database it is skipping some of the records.
Here is my query:
SELECT T1.* INTO jump
FROM Table1 AS T1 INNER JOIN table2 ON T1.ID=table2.ID
WHERE (((T1.amt)<=(SELECT Max(Amt) FROM Table1 As T2 WHERE T2.ID = T1.ID AND (SELECT COUNT(*) FROM Table1 AS T3 WHERE T3.ID = T2.ID AND T3.Amt <= T2.Amt) <= table2.Audit)));
Someone from Microsoft Knowledge base helped me with this query. Here is the original link.
Any help will be greatly appreciated as this part the assignment is causing me not to finish this project.
Thanks a million
Here is my query:
SELECT T1.* INTO jump
FROM Table1 AS T1 INNER JOIN table2 ON T1.ID=table2.ID
WHERE (((T1.amt)<=(SELECT Max(Amt) FROM Table1 As T2 WHERE T2.ID = T1.ID AND (SELECT COUNT(*) FROM Table1 AS T3 WHERE T3.ID = T2.ID AND T3.Amt <= T2.Amt) <= table2.Audit)));
Someone from Microsoft Knowledge base helped me with this query. Here is the original link.
Any help will be greatly appreciated as this part the assignment is causing me not to finish this project.
Thanks a million