How do I copy a view from one server to another?
Change the script so that you use the correct database before running it or remove the use statement completely either manually or by not scripting it out to begin with.