|
-
Oct 15th, 2000, 07:00 AM
#1
Thread Starter
Lively Member
Is it possible to using the 'IN' function to find matches in a ADO recordset?
strSQL = "INSERT INTO tblMechEst (Contract, Resource, EntryDate, Hours, Amount)" _
& "SELECT Contract, Resource, EntryDate, Hours, Sell FROM tblTemp" _
& " WHERE ResourceCode IN (" & Temp2 & ")"
Set Temp = DataEnvironment1.Connection1.Execute(strSQL, , adCmdText)
Set Temp = Nothing
Something like above code...where Temp2 is a recordset created from a previous 'SELECT.... IN' query. Temp2 has a number of records containing the one field 'ResourceCode'.
I'm really stuck on this one so any help would be appreciated!!
-
Oct 15th, 2000, 06:17 PM
#2
Lively Member
Wouldn't you be best combining your queries into one. Temp2 would be replaced with a sub query, which would first bring back your results to be use with the in statement, it may even be faster...just an idea.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|