I want to copy a view from server S1 --> Database D1 to Server S2 --> Database D2.
I generated the script by right clicking the database(D1)--> tasks--> generate script. However, when I execute this script in Database D2 it says that D1 doesn't exist. The error is on line1.
USE [D1] -- Line 1
GO

