cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to load 2 seperate tables to a single matrix

Former Member
0 Kudos

What I would like to do is create a date sorted list of customer orders and purchase orders for a single item(part) and populate a single matrix.

and did i mention quick...

Accepted Solutions (1)

Accepted Solutions (1)

AlexGrebennikov
Active Contributor
0 Kudos

Hi!

i suppose you sould create for example UNION query:

SELECT docdate, cardname, 'purch', docnum FROM OPCH
UNION
SELECT docdate, cardname, 'order', docnum FROM OPOR
ORDER BY 1

Then execute oRS.DoQuery and populate your matrix inside a loop...

propably, somebody can give you some more advices..

hope it helps..

Former Member
0 Kudos

Thanks for the info Alexey I will try your solution.. Thanks

Former Member
0 Kudos

Hmmm coulnt get the union statement to work even in query wizard. has anyone done anything similar? maybee joining to recordsets Can they be added(joined) together??

Former Member
0 Kudos

try your union query in a stored proc and call the stored proc from the query

Indika

Former Member
0 Kudos

Indika. That did it also solved the issue of sorting by date I was worried that an additional quicksort would slow things down too much . Creating a stored Proc provided both solutions

Thank you

Answers (0)