We help IT Professionals succeed at work.

Allowing user to edit view in SQL Server 2000

bfeddish
bfeddish asked
on
I want to have the ability in my application to edit a view. Where can I find where the actual syntax for a view is actually stored in the database? For instance if I have a vew called vwMyNumber which is "select customernumber from customer where Type = 1" I can see the view in sysobjects but where is the actaul command for the view stored?

BTW, this is in SQL 2000. I don't see a slot for that here on EE.
Comment
Watch Question

AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

Commented:
sp_helpText 'putyourViewNameHere'
Database Consultant
CERTIFIED EXPERT
Top Expert 2009
Commented:
or


select Text  from syscomments where id = Object_id('urViewName')

Author

Commented:

That looks like it. One more question. It seems the text in the view is broken down into several rows in syscomments. Would the best thing be to drop the view and re-created it upon it being changed in the new window I am going to create?

Explore More ContentExplore courses, solutions, and other research materials related to this topic.