how to access view from another application

  • if I create view in query analyzer, how to run from another app, what code be like?

     

    or do i put a view in a store priocedure? thanks

  • to an external application a view looks and acts like a table.

    It can be queried against just like a table.

    You should be able to do Selects from it in the application, or build stored procedures that select from the view.

    What other app are you using?

    What are you trying to do?

     

  • so like

    select * from View1

     

    will work fine

     

    but better to but in stored procedure like SP_SelectView1

    and run the proc from the app?

    thanks

  • No, that's not necessarily better. Though it's possible to do it like that, I wouldn't do so myself.

    I suggest that you get hold of BOL (Books On Line) for SQL Server and spend a little time reading about the things that you want to do. There is a lot of good information in there, both for the beginner as well as the veterans.

    /Kenneth

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply