u2_rare_live
SSC Rookie
Points: 29
More actions
May 16, 2003 at 2:07 am
#59175
how can i retrieve from visual fox the view script's of a database.
Andy Warren
SSC Guru
Points: 119912
May 19, 2003 at 8:18 am
#457637
SQL-DMO will let you get the script for any object, should have some sample code somewhere on the site. Alternatively, you could query syscomments using the object id of the view.
Andy
http://www.sqlservercentral.com/columnists/awarren/
AndyConnect with me on LinkedIn
DRBuckingham
SSC Eights!
Points: 996
May 19, 2003 at 8:29 pm
#457733
As Andy suggested, you may issue the following query to retrieve the view script, provided that it was created without the ENCRYPTION attribute:
SELECT [text] FROM syscomments WHERE OBJECT_NAME([id]) = 'YourViewName'
David R Buckingham, MCDBA,MCSA,MCP
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply