M
mpscan
I have the following query:
strOperatorID = "+M"
strSQL = "SELECT TOP 15 tblTemp.CLAIM_NUMBER, tblTemp.OPERATOR_ID " & _
"INTO tblTemp2 " & _
"FROM tblTemp " & _
"WHERE OPERATOR_ID = '" & strOperatorID & "' " & _
"ORDER BY tblTemp.RandomNumber;"
However, I do not want to manually enter strOperatorID, which
corresponds to OPERATOR_ID in tblTemp. I would like this query to run
through and put the TOP 15 into tblTemp2 for every instance of
OPERATOR_ID in the source table.
In this case, there are four unique OPERATOR_ID's in the source, so I
would have 60 records (15 for each) in tblTemp2.
Any ideas?
strOperatorID = "+M"
strSQL = "SELECT TOP 15 tblTemp.CLAIM_NUMBER, tblTemp.OPERATOR_ID " & _
"INTO tblTemp2 " & _
"FROM tblTemp " & _
"WHERE OPERATOR_ID = '" & strOperatorID & "' " & _
"ORDER BY tblTemp.RandomNumber;"
However, I do not want to manually enter strOperatorID, which
corresponds to OPERATOR_ID in tblTemp. I would like this query to run
through and put the TOP 15 into tblTemp2 for every instance of
OPERATOR_ID in the source table.
In this case, there are four unique OPERATOR_ID's in the source, so I
would have 60 records (15 for each) in tblTemp2.
Any ideas?