Convert from row to column

  • Hi All

    I have attached one document.

    Desciption is given in the same doc.

    select DB_NAME(DB_ID())DATABASE_NAME, m.name MEMBER_NAME,g.gid,

    g.name DB_ROLE,'ALL' OBJECTNAME,'ALL' ID,

    case

    when g.name = 'db_owner' THEN 'SELECT, INSERT, UPDATE, DELETE, EXECUTE'

    when g.name = 'db_datareader' THEN 'SELECT'

    when g.name = 'db_datawriter' THEN 'SELECT, INSERT, UPDATE, DELETE'

    else g.name

    end AS RolePrivs

    from sys.sysmembers join sys.sysusers g

    on groupuid = g.uid

    join sys.sysusers m

    on memberuid = m.uid

  • It can be done quite easily.. But we need ready to use data to start working on it..

    please go through this following article and help us help you!

    CLICK HERE FOR FORUM POSTING ETIQUETTES - JEFF MODEN[/url]

    If you post further info, probably , my 1000th post wil be a code for your request 🙂

  • I have attach the document in excel file with desciption.

    I hope that would be k this time.

    Thanks a lot

  • EasyBoy (8/11/2010)


    I have attach the document in excel file with desciption.

    I hope that would be k this time.

    Thanks a lot

    Nope.

    Please read the article[/url] that ColdCoffee pointed you at and supply the information as it describes.


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

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

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