Hello,
I'm trying to perform a query on an Oracle database and it is returning an error
ORA-00932: Inconsistent data types: expected - got NCLOB 00932. 00000 - "inconsistent datatypes: expected% s got% s" * Cause:
* Action:
The query is as follows:
SELECT DISTINCT SQL1.JOBNAME
, SQL1.COMPILATION
, SQL1.FOLDERPATH
, SQL2.JOBSHORTDESCRIPTION
, SQL2.JOBLONGDESCRIPTION
FROM (
SELECT DISTINCT JOBNAME
, FOLDERPATH
, MAX(COMPILATIONTIMESTAMP) AS COMPILATION
FROM JOBEXEC
WHERE PROJECTNAME = 'MDM_PRD'
AND FOLDERPATH NOT LIKE '%Temporario%'
AND JOBNAME NOT LIKE '%Copy%'
AND JOBNAME NOT LIKE '%Teste%'
GROUP BY JOBNAME
, FOLDERPATH
, COMPILATIONTIMESTAMP
) SQL1
INNER JOIN JOBEXEC SQL2 ON SQL1.JOBNAME = SQL2.JOBNAME
This database writes the information as JOBNAME receives a compilation, creating several records of the same name in the JOBNAME field, so it is necessary to give a DISTINCT in JOBNAME to only bring me a record, but when the JOBSHORTDESCRIPTION and JOBLONGDESCRIPTION are within the select, returns the error reported above.
I need to construct this query by pulling all the information without repetitions, but still with the description, would someone know how to reconstruct this query?