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.
| Author |
Topic |
|
Kyriakos
Starting Member
13 Posts |
Posted - 2007-11-05 : 10:29:38
|
| I have a large list of table names and want to create a database, and a view for each of the tables with openrowset. There are no constrains no keys nothing. Is there a fast way to achieve that? |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-11-05 : 10:34:50
|
| Why OPENROWSET? Is it remote database?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Kyriakos
Starting Member
13 Posts |
Posted - 2007-11-05 : 20:44:59
|
| yes it is a remote -non sqlserver db- and the tables should be created as views in sqlserver |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-11-05 : 21:19:48
|
| Using liked server is easier. |
 |
|
|
Kyriakos
Starting Member
13 Posts |
Posted - 2007-11-07 : 08:58:51
|
| it might be easier using linked servers but it's also out of the question.The way I'm thinking it, it should involve a loop with a create view statement containing the name of the table from a subselect (select distinct(tablename) from tables) passed as a variable |
 |
|
|
|
|
|