I have two databases with stock info. Both of them (among others) contains:
SKU;stock_level
What I want to get is:
SKU;stock_level_warehouse1;stock_level_warehouse2
The SKU's are the same at every warehouse, only stock level could be different. How can I merge data from that two databases by the SQL/T-SQL?
EDIT (Sample Data)
SELECT
MSSERVER.company1.dbo.vwArticles.article_sku,
MSSERVER.company1.dbo.vwArticles.warehouse_id,
MSSERVER.company1.dbo.vwArticles.stock_level
FROM
MSSERVER.company1.dbo.vwArticles
WHERE
MSSERVER.company1.dbo.vwArticles.warehouse_id = 1
In the second query (that I want merge with this above) everything is the same except company name - there is "company2" instead "company1".
As the result I want to get:
SKU;STOCK_LEVEL_COMAPNY_1;STOCK_LEVEL_COMPANY_2