You are here: CREATE VIEW - script to automate column names? « MsSQL Server « IT news, forums, messages
CREATE VIEW - script to automate column names?

Posted by clir on 03/12/07 11:44

Hi,

I'm trying to create views on all my existing tables and for that I'd
like to create a script or so.
I don't want to specify the '*' for the columns in the create view
statement. I prefer to specify the column names.
I have the column names int sys.columns table but Do not know how to
handle them to have a statement like that:

CREATE VIEW myVIEW
WITH SCHEMABINDING
AS
SELECT col1name, col2name, col3name, etc...
from sys.columns
....?????.....


Anyone can help?

thx,

Chris

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация