Using PIVOT Sample Sql

Using PIVOT Sample Sql

 SELECT
        accounting,
        research,
        sales,
        operations
    FROM
        (
            SELECT
                dname
            FROM
                dept
        ) PIVOT (
            MAX ( dname )
            FOR dname
            IN ( 'ACCOUNTING' AS accounting, 'RESEARCH' AS research, 'SALES' AS sales, 'OPERATIONS' AS operations )
        );

Comments

Popular posts from this blog

Deleting the Sourcing Rule Assignments API

BarCode with XML Publisher