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
 General SQL Server Forums
 New to SQL Server Programming
 views

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2009-03-17 : 23:12:53
I am using SQL 2005 and working on a database for which I am not the DBA, therefore I do not have rights to create views, alter tables, etc.

However, if I write the code for a view and give it to the DBA she will create it for me.

I need to change a field in a table from varying width to fixed with (6 numerals). Can I do that with a view?

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-03-17 : 23:16:21
A view won't change the underlying table structure. In the view you can SELECT the column with CAST or CONVERT make the output of the view have a different datatype than the underlying column.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -