I'm importing several stores' sales and purchase COSTs where each store has its own package (to utilize parallellism). Setting this up can be rather time consuming, as I have to to go into each stores OLE DB Source and adjust the FROM clause in order to capture that a store has a seperate data base (the database for store number 9999 is [database].[dbo].[sales9999]).
I also want to use the store number in the Select clause for each store. For instance for customer 9999 I need to have Select 9999 AS StoreKey as a column.
Hence I'd like to have like this:
SELECT ? as StoreKey, a.saleprice, b.purchasecost
FROM ? AS a JOIN ? AS b ON a.ID = b.ID
In my OLE DB Source, and match the ?'s with the corresponding parameters. However when I tried to implement this I've received the error that parameters only can be used in the Where clause, which I don't need.
Anyone got any ideas?
Regards,
Whereclause, but never in theFromorSelectclause.