radubalmus
Programmer
Hy i am tring to join 2 querys but i don't get any results
and running them apart takes for ages
I have two table and i have only one commun column "testorder"
the code looks like this
any ideeas??
There are simple solutions for almost every problem! The hard part is to see them!!!!
and running them apart takes for ages
I have two table and i have only one commun column "testorder"
the code looks like this
Code:
For testcounter = 2 To test.count + 1
singletest = test.Item(testcounter - 1)
For catcounter = 2 To cat.count + 1
category = cat.Item(catcounter - 1)
query = "SELECT testorder,product_rating FROM test_orders WHERE " + datetale + " AND costcat ='" + category + "'" + " AND status='Closed' ORDER BY testorder"
Set MyRecordset = Module2.selectFromDB(query) ' connecting to the database
Do Until MyRecordset.EOF
testorderCollection.Add (MyRecordset.Fields(0).Value)
ratingCollection.Add (MyRecordset.Fields(1).Value)
MyRecordset.MoveNext
Loop
Set MyRecordset = Nothing
Set MyConnection = Nothing
For count = 1 To testorderCollection.count
testorder = testorderCollection(count)
rating = ratingCollection(count)
If rating <> "Not Aplicable" Then
query = "SELECT result1,result2,result3,result4,result5,result6,result7,result8,result9,result10 FROM test WHERE testorder='" + testorder + "' AND test='" + singletest + "'"
Set MyRecordset = Module2.selectFromDB(query)
Do Until MyRecordset.EOF
' some code here
MyRecordset.MoveNext
Loop
Set MyRecordset = Nothing
Set MyConnection = Nothing
End If
Next
Next 'Inner
Next 'Outer
any ideeas??
There are simple solutions for almost every problem! The hard part is to see them!!!!