ASP3/ADO/Oracle8
I desesperatly need help on this since I have almost looked everywhere and could not find any clear solution to my problem. I am stuck.
Let's say i have two recordsets that I build with criteria entered in a form by users (here CustID).
....
mysql1="select partno, sum([QtyNC]) as TotNC from CustNCReports where CustID=" & CustID & " group by partNo"
oRS1.Open mysql1, oConn
...
mysql2 ="select partno, sum([QtyDelivered]) as TotDelivered from Deliveries where CustID=" & CustID & " group by partNo"
oRS2.Open mysql2, oConn
...
Now, how can I refer to the first and second query in a third query like below. I simulate that you can call the queries using mysql1 or 2 as names to show you what I am trying to do :
mysql3 = "select partno, (mysql1.TotNC/mysql2.TotDelivered) from mysql1, mysql2 as PPM where mysql1.partNo=mysql2.partNo"
oRS3.Open mysql3, oConn
You can see there is no Parent/Child relationship between recordsets.
Also, if stored procedures are required how to create Oracle temporary views (with criteria as parameters) whose names I would call in the third query ?
Thanks if anybody has any idea.
I desesperatly need help on this since I have almost looked everywhere and could not find any clear solution to my problem. I am stuck.
Let's say i have two recordsets that I build with criteria entered in a form by users (here CustID).
....
mysql1="select partno, sum([QtyNC]) as TotNC from CustNCReports where CustID=" & CustID & " group by partNo"
oRS1.Open mysql1, oConn
...
mysql2 ="select partno, sum([QtyDelivered]) as TotDelivered from Deliveries where CustID=" & CustID & " group by partNo"
oRS2.Open mysql2, oConn
...
Now, how can I refer to the first and second query in a third query like below. I simulate that you can call the queries using mysql1 or 2 as names to show you what I am trying to do :
mysql3 = "select partno, (mysql1.TotNC/mysql2.TotDelivered) from mysql1, mysql2 as PPM where mysql1.partNo=mysql2.partNo"
oRS3.Open mysql3, oConn
You can see there is no Parent/Child relationship between recordsets.
Also, if stored procedures are required how to create Oracle temporary views (with criteria as parameters) whose names I would call in the third query ?
Thanks if anybody has any idea.