is it possible to write a macro/procedure/function to insert data to a particular table with the database name of where the data is coming from as a parameter to the macro.
CREATE MACRO InsertData (pDB as varchar(25))
(
INSERT INTO DestinationTable
SELECT column1, colum2 FROM [pDB].TableForInsert;
)