I have a table called rp_resolution_master.
CREATE TABLE "REQUEST_PORTAL"."RP_RESOLUTION_MASTER"
( "RM_ID" NUMBER,
"SR_ID" NUMBER,
"REQUEST_STATUS" VARCHAR2(200 BYTE),
"COMMENTS" VARCHAR2(4000 BYTE),
"UPDATED_ON" DATE,
"UPDATED_BY" VARCHAR2(500 BYTE),
"INTERNAL_COMMUNICATION" VARCHAR2(1 BYTE) DEFAULT 'N'
);
I am running an unpivot query on this.
SELECT *
From Rp_Resolution_Master
Unpivot INCLUDE NULLS (
value For measures In ( rm_id, request_status, Comments
, updated_by, internal_communication)
)
where sr_id = 1004707
And Updated_On = ( Select Max(Updated_On)
From Rp_Resolution_Master
Where Sr_Id = 1004707);
But I get an error
ORA-01790: expression must have same datatype as corresponding expression 01790. 00000 - "expression must have same datatype as corresponding expression" *Cause:
*Action: Error at Line: 3 Column: 51
What is it that I am doing wrong here?