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
 Updating my View changes my view content

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2006-02-17 : 21:48:11
I have this view in SQL server:

CREATE VIEW dbo.vwFeat
AS
SELECT dbo.Lk_Feat.Descr, dbo.Lk_Feat.Price, dbo.Lk_Feat.Code, dbo.SubFeat.SubNmbr
FROM dbo.Lk_Feat INNER JOIN
dbo.SubFeat ON dbo.Lk_Feat.Idf = dbo.SubFeat.Idt


When ever I open using SQL Entreprise manager to edit it by adding or removing a field i inserts Expr1,2.. and I don t want that. The result I get is:

SELECT dbo.Lk_Feat.Descr AS Expr1, dbo.Lk_Feat.Price AS Expr2, dbo.Lk_Feat.Code AS Expr3, dbo.SubFeat.SubNmbr AS Expr4
FROM dbo.Lk_Feat INNER JOIN
dbo.SubFeat ON dbo.Lk_Feat.Idf = dbo.SubFeat.Idt

I don t want Entreprise manager to generate the Expr fields since I use the real fields in my application.
Thanks for help

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-02-17 : 21:58:28
Use Query Analyser to create or alter your view. It is a prefered tool to use over Enterprise Manager.

----------------------------------
'KH'

Time is always against us
Go to Top of Page

rtutus
Aged Yak Warrior

522 Posts

Posted - 2006-02-19 : 01:32:26
How do I edit the view in Query manager when I open it
Thanks
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-02-19 : 01:51:54
Run Query Analyser. Press F8 to show the Object Browser if it not shown. Browse to your DB and select your view and right click to edit

----------------------------------
'KH'

Time is always against us
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-20 : 00:47:17
or Run
sp_helptext 'dbo.vwFeat' in query Analyser. Copy the result and paste in QA and modify it

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -