Reputation: 9
How can I import or insert the result of this query to another database?
SELECT * FROM TBL_SALES
Upvotes: 1
Views: 34
Reputation: 96004
Use 3 part naming (you should be using 2 part already). In Pseudo terms:
INSERT INTO YourDatabase.YourSchema.YourTable ({Column List})
SELECT {ColumnList}
FROM dbo.TBL_SALES; --I assumed your table was on dbo.
Upvotes: 1