Hello everyone, I was wondering if anyone can help me speed up this process.
I have a table that looks as follow.
PO LINE DATE PART QTY
111 1 06-23-03 A 36
0
222 1 06-23-03 A 48
333 1 07-01-03 A 72
444 1 07-01-03 A 48
444 2 07-01-03 A 36
555 1 06-23-03 B 0
0
12
777 2 06-24-03 D 0
36
888 1 06-24-03 C 66
0
0
999 1 06-24-03 C 48
I have a query that replaces the empty po with the po from the previous line.
I have a query that replaces the empty line with the previous line number.
and one for every other field
In total I have about 8 queries inside a loop
do while not .eof
query1
query2
query3
etc
Example query 1 to replace pn
select table1.id(select table2.[part]
from table1 as table2
where table2.id = table1.id -1) as newpart into table3)
from table1
where table1.pno is null
====>this query makes another table.
It copies the Id of the row where the Part is null to table3
It also copies the Part from the previous row to table 3
Example query 2
Update table3 inner join table1 on table2.id = table1.id
set table1.part = newpart
======>this query copies back the part from table3 to table1
As you can see there are two queries needed for every field that I need to field.
The problem I am having is that it runs very slow and in some computer with windows 98, I can not even open other applications until these process are done.
I was wondering if anyone has any suggestions as to how I can speed this up or if there is a better way of doing this. I really need your help.
thank you kindly
villica
I have a table that looks as follow.
PO LINE DATE PART QTY
111 1 06-23-03 A 36
0
222 1 06-23-03 A 48
333 1 07-01-03 A 72
444 1 07-01-03 A 48
444 2 07-01-03 A 36
555 1 06-23-03 B 0
0
12
777 2 06-24-03 D 0
36
888 1 06-24-03 C 66
0
0
999 1 06-24-03 C 48
I have a query that replaces the empty po with the po from the previous line.
I have a query that replaces the empty line with the previous line number.
and one for every other field
In total I have about 8 queries inside a loop
do while not .eof
query1
query2
query3
etc
Example query 1 to replace pn
select table1.id(select table2.[part]
from table1 as table2
where table2.id = table1.id -1) as newpart into table3)
from table1
where table1.pno is null
====>this query makes another table.
It copies the Id of the row where the Part is null to table3
It also copies the Part from the previous row to table 3
Example query 2
Update table3 inner join table1 on table2.id = table1.id
set table1.part = newpart
======>this query copies back the part from table3 to table1
As you can see there are two queries needed for every field that I need to field.
The problem I am having is that it runs very slow and in some computer with windows 98, I can not even open other applications until these process are done.
I was wondering if anyone has any suggestions as to how I can speed this up or if there is a better way of doing this. I really need your help.
thank you kindly
villica