Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Absent Member.. Absent Member..
Absent Member..
789 views

Query to show me the reached Workflow dates of the projects and requests

Jump to solution

Hello,

 

I have a query which shows me the dates, when the project reached a status.

 

SELECT LAST_UPDATE_DATE,
  STEP_NAME,
FROM kwfl_step_transaction_hist_v
WHERE TOP_INSTANCE_SOURCE_TYPE_CODE = 'IR'
AND CURRENT_FLAG                    = 'Y'
AND TOP_INSTANCE_SOURCE_SET_ID      = 30874
ORDER BY step_transaction_history_id;

 

In this query I get all workflowstatus and  -dates for the project (ID = 30874)  in a VERTICAL structure. How can I get the result in a HORIZONTAL structure. I tried with the function DECODE but it didn't work.

 

now I get the result:

last_update_date    |      step_name

12.01.13                   |      Projectstart

14.02.13                   |      SRS Creation

..

..

 

I want to get:

Projectstart               |     SRS Creation    .....

12.01.13                   |     14.02.13          .....

 

Of course I need the results for the projects and requests. that means that I need the project_name, project_id or request_id.

 

Thank you for your help.

 

Regards,

Ramazan

0 Likes
1 Solution

Accepted Solutions
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

With SQL alone it will be little challenging. You can do this easily in PL/SQL.

 

I found this site useful to get it done via SQL alone, you can refer it. 

 

http://stackoverflow.com/questions/9155033/sql-turning-rows-into-columns

 

Hope this help.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)

View solution in original post

1 Reply
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

With SQL alone it will be little challenging. You can do this easily in PL/SQL.

 

I found this site useful to get it done via SQL alone, you can refer it. 

 

http://stackoverflow.com/questions/9155033/sql-turning-rows-into-columns

 

Hope this help.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.