gvielliard
Programmer
Hi all,
I have two stored procedure StoredProc1 and StoredProc2 runing on two different servers, they are identical, only the datas in the recordset they retrieve are different.
The two recordset have the same structure (same field names).
What I want to have is only one recordset but I can't mofify anything inside StoredProc1 and StoredProc2 and depending of the option entered in StoredProc1 and StoredProc2, the number and the name of the fields are different.
If something like UNION between two stored procedure exists it would solve the problem.
To be clearer, here is an example:
If option 1 is set (for StoredProc1 and StoredProc2) I have this 2 recordset
ProductID ClientID Price
--------- -------- -----
10000 10000 10
10001 10001 11
10002 10002 12
ProductID ClientID Price
--------- -------- -----
20000 20000 20
20001 20001 21
and what I need is this recorset (a merge of the two previous)
ProductID ClientID Price
--------- -------- -----
10000 10000 10
10001 10001 11
10002 10002 12
20000 20000 20
20001 20001 21
If the Option is set to 2, I would have these 2 recordset:
ClientID Location
-------- --------
10000 City10
10001 City11
10002 City12
10003 City13
10004 City14
ClientID Location
-------- --------
20000 City20
20001 City21
And I want this single recordset:
ClientID Location
-------- --------
10000 City10
10001 City11
10002 City12
10003 City13
10004 City14
20000 City20
20001 City21
Thank you for youe help.
Gilles
I have two stored procedure StoredProc1 and StoredProc2 runing on two different servers, they are identical, only the datas in the recordset they retrieve are different.
The two recordset have the same structure (same field names).
What I want to have is only one recordset but I can't mofify anything inside StoredProc1 and StoredProc2 and depending of the option entered in StoredProc1 and StoredProc2, the number and the name of the fields are different.
If something like UNION between two stored procedure exists it would solve the problem.
To be clearer, here is an example:
If option 1 is set (for StoredProc1 and StoredProc2) I have this 2 recordset
ProductID ClientID Price
--------- -------- -----
10000 10000 10
10001 10001 11
10002 10002 12
ProductID ClientID Price
--------- -------- -----
20000 20000 20
20001 20001 21
and what I need is this recorset (a merge of the two previous)
ProductID ClientID Price
--------- -------- -----
10000 10000 10
10001 10001 11
10002 10002 12
20000 20000 20
20001 20001 21
If the Option is set to 2, I would have these 2 recordset:
ClientID Location
-------- --------
10000 City10
10001 City11
10002 City12
10003 City13
10004 City14
ClientID Location
-------- --------
20000 City20
20001 City21
And I want this single recordset:
ClientID Location
-------- --------
10000 City10
10001 City11
10002 City12
10003 City13
10004 City14
20000 City20
20001 City21
Thank you for youe help.
Gilles