need help on writing a stored procedure.
I have three tables from two different databases
DB1.tb (
Ps_ID(pk,int,not null),
Po_ID(int,not null))
--being Ps_ID distributed as per values into
DB2.tb1 (
Ps_ID(int,not null),
DT (datetime,not null),
val (float,not null))
DB2tb2 (
ps_ID(int,not null),
DT (datetime,not null),
val(float,not null))
what would be the STORED PROCEDURE to BULK INSERT all the datas
in a new table
from DB2.tb1 and DB2.tb2 joinning DB1.tb ON Ps_ID
this is my first post so please excuse me on the presentation part.
I have three tables from two different databases
DB1.tb (
Ps_ID(pk,int,not null),
Po_ID(int,not null))
--being Ps_ID distributed as per values into
DB2.tb1 (
Ps_ID(int,not null),
DT (datetime,not null),
val (float,not null))
DB2tb2 (
ps_ID(int,not null),
DT (datetime,not null),
val(float,not null))
what would be the STORED PROCEDURE to BULK INSERT all the datas
in a new table
from DB2.tb1 and DB2.tb2 joinning DB1.tb ON Ps_ID
this is my first post so please excuse me on the presentation part.
