Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2007
    Posts
    84

    Unanswered: SQL Crosstab query

    Im trying to do a crosstab query on the information below. Here is the data from the simple select statement:

    ENTITY_NO PRIMARY_USER WORKFLOW_RESP
    132509 Mi Banker Banker
    132509 Rcc Analyst RCC Analyst


    SELECT e.entity_no,etv.primary_user, workflow_resp
    FROM FC_ENTITY_TEAMS_V ETV,
    WBS_ENTITIES e
    WHERE etv.ENTITY_ID = e.ENTITY_ID
    AND e.ENTITY_NO = '132509'
    AND etv.WORKFLOW_RESP IN ('Banker', 'RCC Analyst')


    I would like to create a column for Banker and a column for RCC Analyst. Then to have all the data in one row. Is this possible?

    Here is my data and crosstab query so far:

    ENTITY_NO BANKER ANALYST
    132509 Banker
    132509 RCC Analyst


    SELECT e.entity_no,
    DECODE (etv.workflow_resp, 'Banker', etv.workflow_resp) AS
    BANKER,
    DECODE (ETV.WORKFLOW_RESP, 'RCC Analyst',
    etv.WORKFLOW_RESP) AS ANALYST
    FROM FC_ENTITY_TEAMS_V ETV,
    WBS_ENTITIES e
    WHERE etv.ENTITY_ID = e.ENTITY_ID
    AND e.ENTITY_NO = '132509'
    AND etv.WORKFLOW_RESP IN ('Banker', 'RCC Analyst')

  2. #2
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    That seems to work just fine, what's your problem then ?

Posting Permissions

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