NJudson
Who farted?
- Local time
- Today, 14:31
- Joined
- Feb 14, 2002
- Messages
- 297
I have an SQL statement which basically filters out a table to display a particular record.
SELECT * FROM Table1 WHERE [MTX] = '" & MTX & "' AND [Freq] = '" & VCH & "'
This filters the recordset but what if I want to work with a field from the SQL result? Is this possible or is it more of a display or read-only result. I don't have much experience with sql so I'm not sure what works or what doesn't.
My goal is to loop through a table2 and for each recordset I set MTX = Table2.Field(0) and VCH = Table2.Field(2). Then filter out Table1 Where Table1.[MTX] = MTX And Table1.[Freq] = VCH. When the Filter returns the result I then want to make Table2.Field(1) = Table1.[Channel]. There may be up to 10,000 recordsets in table2 to loop through so my code the I'm currently using with nested loops and nested if then statements is highly ineffiecent and slow. One of may biggest things I don't understand is how to work with the results of SQL statements. I'm using Access 2k. Thanks for anyone taking the time to look at this.
SELECT * FROM Table1 WHERE [MTX] = '" & MTX & "' AND [Freq] = '" & VCH & "'
This filters the recordset but what if I want to work with a field from the SQL result? Is this possible or is it more of a display or read-only result. I don't have much experience with sql so I'm not sure what works or what doesn't.
My goal is to loop through a table2 and for each recordset I set MTX = Table2.Field(0) and VCH = Table2.Field(2). Then filter out Table1 Where Table1.[MTX] = MTX And Table1.[Freq] = VCH. When the Filter returns the result I then want to make Table2.Field(1) = Table1.[Channel]. There may be up to 10,000 recordsets in table2 to loop through so my code the I'm currently using with nested loops and nested if then statements is highly ineffiecent and slow. One of may biggest things I don't understand is how to work with the results of SQL statements. I'm using Access 2k. Thanks for anyone taking the time to look at this.