SELECT
METERREADINGS."READINGTYPE", METERREADINGS."KWHREAD", METERREADINGS."KWREAD", METERREADINGS."KVARHREAD", METERREADINGS."KVARREAD",
TRANSACTIONS."TRANSACTIONTYPE", TRANSACTIONS."DEVICEID", TRANSACTIONS."LOGDATE", TRANSACTIONS."LOGBY", TRANSACTIONS."RESERVED1", TRANSACTIONS."RESERVED2",
SERVICE."SERVICEID",
PREMISE."CITY", PREMISE."SERVICEADDRLINE1"
FROM
"MTS_E1"."METER" METER, "MTS_E1"."METERREADINGS" METERREADINGS, "MTS_E1"."TRANSACTIONS" TRANSACTIONS, "MTS_E1"."SERVICE" SERVICE, "MTS_E1"."PREMISE" PREMISE
WHERE
METER."METERID" = METERREADINGS."METERID" AND METER."METERID" = TRANSACTIONS."DEVICEID" AND SERVICE."SERVICEID" (+)= TRANSACTIONS."RESERVED1" AND (TRANSACTIONS."TRANSACTIONTYPE" = 'DRC' OR TRANSACTIONS."TRANSACTIONTYPE" = 'RCV' OR TRANSACTIONS."TRANSACTIONTYPE" = 'SET' OR TRANSACTIONS."TRANSACTIONTYPE" = 'RMV') AND TRANSACTIONS."DEVICEID" = '0101GE' AND SERVICE."PREMISENUMBER" = PREMISE."PREMISENUMBER"
ORDER BY
TRANSACTIONS."DEVICEID" ASC
THE RESERVED1 FIELD ON THE TRANSACTION TABLE IS ONLY POPULATED WITH A SERVICEID WITH THE TRANSACTION TYPES (SET AND RMV) HOWEVER I STILL NEED THE OTHER TWO TRANSACTION TYPES TO BE INCLUDED IN THE REPORT(ALTHOUGH THEY NEED NO INFORMATION FROM THE SERVICE TABLE) I HOPE THIS MAKES SENSE TO SOMEONE. THANKS
METERREADINGS."READINGTYPE", METERREADINGS."KWHREAD", METERREADINGS."KWREAD", METERREADINGS."KVARHREAD", METERREADINGS."KVARREAD",
TRANSACTIONS."TRANSACTIONTYPE", TRANSACTIONS."DEVICEID", TRANSACTIONS."LOGDATE", TRANSACTIONS."LOGBY", TRANSACTIONS."RESERVED1", TRANSACTIONS."RESERVED2",
SERVICE."SERVICEID",
PREMISE."CITY", PREMISE."SERVICEADDRLINE1"
FROM
"MTS_E1"."METER" METER, "MTS_E1"."METERREADINGS" METERREADINGS, "MTS_E1"."TRANSACTIONS" TRANSACTIONS, "MTS_E1"."SERVICE" SERVICE, "MTS_E1"."PREMISE" PREMISE
WHERE
METER."METERID" = METERREADINGS."METERID" AND METER."METERID" = TRANSACTIONS."DEVICEID" AND SERVICE."SERVICEID" (+)= TRANSACTIONS."RESERVED1" AND (TRANSACTIONS."TRANSACTIONTYPE" = 'DRC' OR TRANSACTIONS."TRANSACTIONTYPE" = 'RCV' OR TRANSACTIONS."TRANSACTIONTYPE" = 'SET' OR TRANSACTIONS."TRANSACTIONTYPE" = 'RMV') AND TRANSACTIONS."DEVICEID" = '0101GE' AND SERVICE."PREMISENUMBER" = PREMISE."PREMISENUMBER"
ORDER BY
TRANSACTIONS."DEVICEID" ASC
THE RESERVED1 FIELD ON THE TRANSACTION TABLE IS ONLY POPULATED WITH A SERVICEID WITH THE TRANSACTION TYPES (SET AND RMV) HOWEVER I STILL NEED THE OTHER TWO TRANSACTION TYPES TO BE INCLUDED IN THE REPORT(ALTHOUGH THEY NEED NO INFORMATION FROM THE SERVICE TABLE) I HOPE THIS MAKES SENSE TO SOMEONE. THANKS