Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01460: unimplemented or unreasonable conversion requested

Nimish GargMar 4 2014 — edited Mar 4 2014

Hi All,

My Oracle version is: Oracle Database 11g Release 11.2.0.3.0 - 64bit Production

desc device_config_responses

Name                Null     Type          

------------------- -------- --------------

ID                  NOT NULL NUMBER(9)     

DEVICE_ID           NOT NULL NUMBER(9)     

CONFIG_LINEAGE_ID   NOT NULL NUMBER(9)     

REQUEST_PAYLOAD              VARCHAR2(4000)

REQUEST_CREATED_AT           DATE          

RESPONSE_PAYLOAD             VARCHAR2(4000)

RESPONSE_CREATED_AT          DATE          

COMMAND_STATUS_ID   NOT NULL NUMBER(9)     

COMMAND_ID          NOT NULL NUMBER(9)      

create or replace package body device_config_respons_pkg

as

    procedure     upsert_record   ( p_device_id           in      number,

                                    p_config_id           in      number,

                                    p_update_request      in      char,

                                    p_request_payload     in      varchar2)

    is

        v_config_lid                configs.lineage_id%type;

        v_request_payload           varchar2(4000);

    begin

        select  lineage_id

        into    v_config_lid

        from    configs

        where   id = p_config_id;

        begin

            select decode(p_update_request, '1', p_request_payload, request_payload) into v_request_payload from device_config_responses where device_id = p_device_id and config_lineage_id = v_config_lid;

        exception when no_data_found then

            if (p_update_request = '1') then

                v_request_payload := p_request_payload;

            end if;

        end;

        .

        .

        .

    end upsert_record;

end;

I am facing "ORA-01460: unimplemented or unreasonable conversion requested" and not able to debug the reason

  SELECT DECODE(p_update_request, '1', p_request_payload, request_payload) INTO v_request_payload FROM device_config_responses WHERE device_id = p_device_id AND config_lineage_id = v_config_lid;

 

Please guide me. Thanks in anticipation.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2014
Added on Mar 4 2014
7 comments
551 views