hi all, please help me on this...

Is there a way to get the SQl View's String Command used to create said View?

For Example,

I have a View named tryView, now I want to get the string command used to create tryView like this one...

SELECT titles.title, publishers.pub_name, pub_info.logo, titles.pub_id as tpid, publishers.pub_id as ppid
FROM (titles LEFT JOIN publishers ON titles.pub_id=publishers.pub_id)
LEFT JOIN pub_info ON titles.pub_id=pub_info.pub_id

how do i retrieve this string using vb.Net?

Thank You!

Recommended Answers

what is the database that you are using ?

Jump to Post

All 2 Replies

what is the database that you are using ?

In MS SQL Server Management Studio: Right click the view and select script view as > create to > New Query Editor Window.

A more "advanced" approach is to visit sys.sql_modules (I'm not sure about the modules part of the table).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.