Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 sql

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-12-06 : 09:06:19
puja writes "HI,
I have questions on copying Views from one database to other sql server database. I knwo this is kind of stupid questions, but somehow it's not working for me. how do I copy view into other database?

your help is greatly appreciated

thanks
puja"

rihardh
Constraint Violating Yak Guru

307 Posts

Posted - 2002-12-06 : 09:28:38
There are quite a few methods, how you could "copy" views. You can use Data Transformation Services or you can simply copy-paste the T-SQL syntax.

In either way you have to consider that both DB's (table structures)are exactly the same...

Go to Top of Page

swarn
Starting Member

12 Posts

Posted - 2002-12-09 : 07:09:02
you can do another way as well which is like this:-

1. open SQL console and then choose require database
2. right click on the databasew and choose "All Tasks"
3. then choose "Generate SQL scripts"
4. open dialog box click on "show all" command button
5. and generate the script for require objects
6. then run for query analyzer to create objects..

note: you have choice of generate one script file for all views/tables OR separate files for each one..

swarn

Go to Top of Page
   

- Advertisement -