Results 1 to 6 of 6

Thread: Create view

  1. #1
    Join Date
    Feb 2006
    Posts
    38

    Unanswered: Create view

    hi,if the below query
    Code:
    select DISTINCT group_module_menu_info.menulink FROM
     user_group_role_info,group_role_module_info,group_module_menu_info
     where  user_group_role_info.userid=user_table.userid and
      ((group_module_menu_info.moduleid = user_group_role_info.moduleid)OR
    (user_group_role_info.roleid=group_role_module_info.roleid and
     group_module_menu_info.moduleid = group_role_module_info.moduleid))
    if i want to create a view
    how ?
    thank you!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    CREATE VIEW myviewname AS 
    select statement goes here
    how hard did you try to look up the CREATE VIEW syntax?

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2006
    Posts
    2
    Quote Originally Posted by kingxiaobao
    hi,if the below query
    Code:
    select DISTINCT group_module_menu_info.menulink FROM
     user_group_role_info,group_role_module_info,group_module_menu_info
     where  user_group_role_info.userid=user_table.userid and
      ((group_module_menu_info.moduleid = user_group_role_info.moduleid)OR
    (user_group_role_info.roleid=group_role_module_info.roleid and
     group_module_menu_info.moduleid = group_role_module_info.moduleid))
    if i want to create a view
    how ?
    thank you!


    Create View <ViewName>
    as
    (Your Sql Statement)


    Regards
    Subramanyam.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Subramanyam
    Create View <ViewName>
    as
    (Your Sql Statement)
    good one

    looks a lot like post #2, though

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Good answer.

    Appears similar to post #2, however.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by blindman
    Good answer.

    Appears similar to post #2, however.
    that's funny, your post looks a lot like post #4

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •