Unanswered: Obtaining a value from a view for a Global parameter.
Good day all,
I am using SQL 2000 to pull Data from a AS400 DB and have a DTS package that pulls in the required data and all works well enough. However, not really as the Data is pulls in is dictated from a view using Global parameters, it takes the lowest acct number and the highest and brings in the desired records, but when this procedure is run during the end of the month the Account numbers are scattered in range and bringing in everything in is both unnecessary and very time consuming, so I decided to base the range from a view, and will use that dataset as a global variable, however this pulls in only the first account/record of course.
How do I get the AS400 connection SQL to read every account and action the SQL code for each and every Account from the View? The code for the Global variable is as follows:
SELECT Account FROM vwEndmonthAccts
and the code for the connection between AS400 and the SQL destination is:
where Account = ?
Can anyone assist with this problem? I did think about a do loop in the code above but not sure how to go about coding or if it will work since the connection is based on AS400.