Hi,
I need to calculate the Wrench Time for a Breakdown Duration from Status of Breakdown Notification from table JCDS.
The data in JCDS table is
i have used SQL Script Procedure to calculate the changes from one status to the other status and the output i'm getting is like below.
I'm not able to club the values as per the Notification Number and below is the code i used.
SELECT NOTIFNO, OBJECT, ENRDUR, MHMDUR, MHSDUR, MHPDUR, MHODUR, MHJDUR, MHRDUR, NODUR
FROM :SQL_STATUS_ENR
UNION
SELECT NOTIFNO, OBJECT, ENRDUR, MHMDUR, MHSDUR, MHPDUR, MHODUR, MHJDUR, MHRDUR, NODUR
FROM :SQL_STATUS_MHM
UNION
SELECT NOTIFNO, OBJECT, ENRDUR, MHMDUR, MHSDUR, MHPDUR, MHODUR, MHJDUR, MHRDUR, NODUR
FROM :SQL_STATUS_MHS
UNION
SELECT NOTIFNO, OBJECT, ENRDUR, MHMDUR, MHSDUR, MHPDUR, MHODUR, MHJDUR, MHRDUR, NODUR
FROM :SQL_STATUS_MHP
UNION
SELECT NOTIFNO, OBJECT, ENRDUR, MHMDUR, MHSDUR, MHPDUR, MHODUR, MHJDUR, MHRDUR, NODUR
FROM :SQL_STATUS_MHO
ORDER BY NOTIFNO, OBJECT;
Can anyone suggest me how to club the values as per Notification into a single row.
Regards,
Ramana.
Request clarification before answering.
Hi Lars,
Thanks for your reply.
The syntax you have provided above is not working. i mean it's giving syntax error too.
Please suggest me in detail.
Regards,
Ramana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.