ORA-01789: query block has an incorrect number of columns of results

Hi guys,.

I do the query like this:

Select

SPH. PERIOD,

SPL. PERIODE_DETAIL,

SUM (case when spl.) SUB_KRITERIA = "KEHADIRAN" then spl. NILAI

end) AKTIFITAS_KEHADIRAN

SUM (case when spl.) SUB_KRITERIA = "KONSISTENSI" then spl. NILAI

end) AKTIFITAS_KONSISTENSI

SUM (case when spl.) SUB_KRITERIA = "KERJASAMA" then spl. NILAI

end) KOMUNIKASI_KERJASAMA

SUM (case when spl.) SUB_KRITERIA = "KOORDINASI" then spl. NILAI

end) KOMUNIKASI_KOORDINASI

SUM (case when spl.) SUB_KRITERIA = "INTEGRITAS" then spl. NILAI

end) LOYALITAS_INTEGRITAS

SUM (case when spl.) SUB_KRITERIA = "KEJUJURAN" then spl. NILAI

end) LOYALITAS_KEJUJURAN

SUM (case when spl.) SUB_KRITERIA = "KEPATUHAN" then spl. NILAI

end) LOYALITAS_KEPATUHAN

of sci_pk2m_line@sucodev spl, sci_pk2m_header@sucodev sph

where spl.ID_PK2M_HEADER = sph.ID_PK2M_HEADER

and sph. UNIT_KERJA =: P314_ID_UNIT_KERJA

and sph. = PERIOD: P314_PERIODE

and sph. PERSON_ID =: P314_NPP

Group

SPH. PERIOD,

SPL. PERIODE_DETAIL

UNION ALL

Select

LON

KETERANGAN,

UNIT_KERJA,

PERIOD,

PERSON_ID,

AKTIFITAS_KEHADIRAN,

AKTIFITAS_KONSISTENSI,

KOMUNIKASI_KERJASAMA,

KOMUNIKASI_KOORDINASI,

LOYALITAS_INTEGRITAS,

LOYALITAS_KEJUJURAN,

LOYALITAS_KEPATUHAN

Of

SCI_TOTAL_PK2M_V

where = PERIOD: P314_PERIODE

and PERSON_ID =: P314_NPP;

When I compile and run the program there show the error like this "ORA-01789: block has an incorrect number of columns in query results.

I don't know what does mean,.

could you help me with my problem?

Thank you

Best regards

Jeff

Hi Linda

You made the UNION between a statement select 9 columns to return with a second return 12 columns. Please unify the number of columns selected at a time.

I hope that solves your problem

Concerning

Mahmoud

Tags: Database

Similar Questions

  • ORA-26040: data block has been loaded using the NOLOGGING option

    Hello

    Why option NOLOGGING is a proposed option can corrupt the data files?

    You would kind of explain it to me?

    Thank you.

    Should you have primary level NOLOGGING operations, incremental update of the previous day.

    See 9.3.6 to http://docs.oracle.com/cd/E11882_01/server.112/e41134/manage_ps.htm#SBYDB00206

    and 13.4 at http://docs.oracle.com/cd/E11882_01/server.112/e41134/scenarios.htm#SBYDB00920

    Hemant K Collette

  • ORA-01789 - when you use the operator of TABLE and SEM_MATCH

    Client version: 11.1.0.7 on Windows 7 (32 bit)
    Server version: 11.2.0.3 on Windows 7 (64-bit)

    I am model prototyping a simple RDF, and I'm getting a ' ORA-01789: block has an incorrect number of columns in query results "when you use the SEM_MATCH with the SCOREBOARD operator.

    I can run this:
    select id, a.triple.GET_TRIPLE() from drik.rdf_data a
    and the first line is:
    (<http://www.ihc.com/drik/term#2>, <http://www.w3.org/2000/01/rdf-schema#subClassOf>, <http://www.ihc.com/drik/term#1>)
    Now, I want to use the TABLE like this:
    select
      c
    from 
      table(sem_match('{ <http://www.ihc.com/drik/term#2> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?c . }', 
            sem_models('Prototype'),
            sem_rulebases('RDFS'),
            sem_aliases(sem_alias('rdfs','http://www.w3.org/2000/01/rdf-schema/')),
            null
            ))
    But this performance gives the ORA-07189. Even try SELECT * gives the same error.

    I expect to get a refund:
    <http://www.ihc.com/drik/term#1>
    How should I approach troubleshooting this?

    Thank you, Steve

    Thanks for posting the script. I was able to reproduce the error locally.

    The problem is the use of the sem_apis.create_rules_index () procedure, which has been deprecated:
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25609/sdo_rdf_newfeat.htm#autoId26

    Please use sem_apis.create_entailment () instead, and the error should disappear.
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25609/sem_apis_ref.htm#CHEHDGBD

    Thank you
    Matt

  • Ho labor-intensive place Adobe Premiere elements 13, Ho da knew PC, submitted by number di series product via da mail Adobe, NON RIESCO AD HAS "CONVALIDA DEL NUMBER DI SERIES!" Connesso an internet (Como ora), clicco su "convalida" my no s

    Ho labor-intensive place Adobe Premiere elements 13, Ho da knew PC, submitted by number di series product via da mail Adobe, NON RIESCO AD HAS "CONVALIDA DEL NUMBER DI SERIES!" Connesso an internet (Como ora), clicco su "convalida" my non nulla succede. E sono 3 giorni che provo! STO rimpiangendo di aver the price made!

    Hello

    Something on your system or your local network you can contact Adobe servers. Make sure that your hosts file has an entry for adobe and make sure that any firewall software antivirus is not interfere.

    Location of the hosts file:

    %SystemRoot%\system32\drivers\etc\hosts

    Open hosts in Notepad and check if there are entries in adobe or not, if yes, then please rename the hosts to hosts.old and try again.

    Let us know if this helps

    Thank you

    Varun

  • "Is:java.sql.SQLException error: ORA-01555: snapshot too old: rollback segment number with the name ' ' too small '.

    Hello

    We conduct apply CM which is a failure with the Error: "declared:java.sql.SQLException: ORA-01555: snapshot too old: rollback segment number with the name '' too small'."

    Its in our unique the production instance. I checked on the return parameter. Here are the details.

    SQL > show Cancel parameter

    VALUE OF TYPE NAME

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

    _in_memory_undo Boolean TRUE

    _undo_debug_usage integer 2

    UNDO_MANAGEMENT string AUTO

    UNDO_RETENTION integer 40000

    undo_tablespace string APPS_UNDOTS1

    SQL > select max (maxquerylen) of v$ undostat;

    MAX (MAXQUERYLEN)

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

    637116

    Please suggest what needs to be done to go further.


    Kind regards

    Prabhat.

    Post edited by: 942633

    Hello

    ORA-02067: the rollback transaction or registration required

    As mentioned, you will need to look at the design of the code:

    Error: ORA 2067
    Text: rollback transaction or registration required
    -------------------------------------------------------------------------------
    Cause: A failure (typically a trigger or a stored procedure with several updates remotely) has occurred, such as the execution of all or nothing from a previous call to Oracle cannot be guaranteed.
    Action: return to a previous point of backup or restore the transaction and resubmit.

    ------

    ORA-01555 caused by the following SQL statement (SQL ID: 5y0q4u8r2hdy9, query term s = 637608, SCN: 0x0bcc.4ed82762):

    ------

    ACTUAL SIZE [MB] UNDO UNDO RETENTION [s] NECESSARY UNDO SIZE [MB]

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

    304849 40000 267232.292

    To better help you, please let us know:

    -What is the function of this program.

    -Did you recently parameter changes until you have this error.

    Please ensure that the validation controls are implemented correctly, the DBA team and development will work hand in hand.

    Thank you &

    Best regards

  • Apple Mail displays an incorrect number of unread messages

    Hello

    Apple Mail on my iPad is connected to my account Hotmail from Microsoft. "I have e-mail boxes a decade in my Hotmail account (in addition to the standard"Inbox) "and Hotmail will sort my emails in each box, rules-based, I created.

    Several months ago, Apple mail started to display correctly the number of emails unread in one of my mailboxes. Recently, he began showing the number of emails unread in a second box incorrectly. In one, Apple mail displays 4 emails unread, even if this one is almost always empty. In the other, who always has a certain E-mail read in it, Apple mail displays 6 emails no more read than exist. In other words, if there are 2 unread emails, Apple mail says I have 8.

    • I checked the mail boxes in my account Hotmail by going there in my browser to see if it is has more emails unread only download of Apple mail. There is not.
    • I downloaded the Microsoft Outlook application to check and it shows the number of emails unread for each box.

    Is there a way to get Apple mail to correctly display the number of unread emails?

    Thank you.

    Ray

    Hello there Ray_ES,

    Looks like it's just your Apple's Mail application that shows the incorrect number of e-mails on your iPad. I would like to start by leaving the Mail app and the settings app:

    Force an app to close the iOS

    1. press the Home button twice quickly. You will see small glimpses of your applications recently used.
    2. slide to the left to find the application you want to close.
    3. push upward on the overview of the application to close.

    When you have done that reboot the device and test again the question:

    iOS: switch off and on (restart) and reset

    If the problem persists then I would remove the account from the application settings, restart the iPad and try again:

    1. Delete the email account assigned from your device with these steps:
      1. Tap Settings > Mail, Contacts, calendars.
      2. Press the email account.
      3. Press to delete the account.
      4. Add your account again.

    From: get help with Mail on iPhone, iPad and iPod touch

    Thank you for using communities of Apple Support.

  • Error message "the file wmp.dll has a version number of 11.0.5721.5280 where 11.0.5721.5268 was expected. Windows Media Player is not installed correctly and must be reinstalled.

    Original title: I need the Windows Media Player for WinXP 32 bit.

    Recently when I tried to play an Audio CD using Media Player, I get the following message: "the file wmp.dll has a version number of 11.0.5721.5280 where 11.0.5721.5268 was expected. Windows Media Player is not installed correctly and must be reinstalled. You want to install the player from the Microsoft website? "When I clicked 'Yes', the window get Window Media Player appeared that lists the different versions of the operating system Windows however, in the category Windows XP, only the 64-bit version has been registered and I need the Windows XP 32-bit version. Anyone know where I can get the 32 bit version?

    Hi donsor,

    You did it of any material changes or software on the computer before this problem?

    You can follow this link & check if the problem persists.

    After the WMP update you an error of wmploc.dll on version number incorrect


    Reference:
    Windows Media Player is not properly installed and needs to be reinstalled

    Hope the helps of information.
    Please post back and we do know.

  • ORA-01422: exact fetch returns more than number of rows - FIX?

    Dear experts of PL/SQL,

    I encounter this problem when running under procedure, how this can be exceeded? Procedure was running well for the last few weeks and we have this problem all of a sudden:

    ORA-01422: exact fetch returns more than number of lines

    CREATE OR REPLACE PROCEDURE DBA_MAINT. () SQL_EXEC_DRILLDOWN

    beginsnapid in numbers

    endsnapid in numbers

    )

    AS

    begin_date varchar2 (30);

    End_date varchar2 (30);

    statName VARCHAR2 (64);

    err_msg VARCHAR2 (100);

    The CNT number;

    cursor c1

    is

    Select stat_name,

    Sum in the NTC

    de)

    Select instance_number,

    stat_name,

    ((VALUE) max - min (VALUE)) COUNTY

    of dba_hist_sysstat

    where stat_name in ("run the County", 'parse count (total)', "parse count (hard)")

    and snap_id between beginsnapid

    and endsnapid

    Instance_number group, stat_name)

    Stat_name group

    Union of all the

    Select stat_name,

    Sum in the NTC

    de)

    Select instance_number,

    stat_name,

    Round (((value) - (VALUE) min Max) / 1000000) COUNTY

    of DBA_HIST_SYS_TIME_MODEL

    where stat_name in ("DB CPU", "background time cpu", 'sql execute elapsed time', 'analysis elapsed time', ' parse hard time elapsed ")

    and snap_id between beginsnapid

    and endsnapid

    Instance_number group, stat_name)

    Stat_name Union group all the

    Select stat_name,

    MySQL as cnt

    de)

    Select a.stat_name stat_name,

    (b.value - a.value) VALUE

    dba_hist_sysstat a, dba_hist_sysstat b

    where a.dbid = b.dbid

    and a.instance_number = b.instance_number

    and a.stat_id = b.stat_id

    and a.snap_id = beginsnapid

    and b.snap_id = endsnapid

    and a.stat_name in ('physical reads',

    "physical Scriptures."

    "physical read IO total number of applications."

    "physical write IO requests total."

    "Physics read total multi block requests."

    "total multi block request writing for the physical box,.

    ("reading session logic")

    and a.instance_number = b.instance_number)

    Stat_name group;

    Start

    Start

    Select distinct TO_CHAR (END_INTERVAL_TIME, "MM/DD/YYYY HH24 '")

    in begin_date

    of dba_hist_snapshot

    where snap_id = beginsnapid;

    Select distinct TO_CHAR (END_INTERVAL_TIME, "MM/DD/YYYY HH24 '")

    in end_date

    of dba_hist_snapshot

    where snap_id = endsnapid;

    -DBMS_OUTPUT. Put_line (begin_date);

    -DBMS_OUTPUT. Put_line (end_date);

    exception

    When no_data_found

    then

    null;

    end;

    C1_rec IN C1

    LOOP

    Start

    Insert

    in DBA_MAINT. Values (DB_SQL_EXEC_DETAILS)

    beginsnapid,

    endsnapid,

    begin_date,

    End_date,

    c1_rec.stat_name,

    c1_rec. CNT

    );

    -DBMS_OUTPUT. Put_line (c1_rec.stat_name |) »      '|| c1_rec. CNT);

    exception

    When no_data_found

    then

    null;

    end;

    end loop;

    commit;

    end;

    /

    Reasons to explain above, but I think it would be more appropriate select latest END_INTERVAL_TIME as follows

    Select TO_CHAR ((max (END_INTERVAL_TIME)), "MM/DD/YYYY HH24")

    in begin_date

    of dba_hist_snapshot

    where snap_id = beginsnapid;

    Select TO_CHAR ((max (END_INTERVAL_TIME)), "MM/DD/YYYY HH24")

    in end_date

    of dba_hist_snapshot

    where snap_id = endsnapid;

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • ORA-02354: Error exporting/importing data, ORA-01555: snapshot too old: rollback segment number with the name "" too small

    Hello

    I am getting below error while taking expdp backup table of BLOB.

    ORA-31693: Data Table object 'HCLM_ADMIN '. "' SCAN_UPLOADEDFILES_TEMP ' failed to load/unload and being ignored because of the error:

    ORA-02354: Error exporting/importing data

    ORA-01555: snapshot too old: rollback segment number with the name "" too small

    ORA-22924: snapshot too old

    ORA-31693: Data Table object 'HCLM_ADMIN '. "' TPA_FAXWATCHER ' failed to load/unload and being ignored because of the error:

    ORA-02354: Error exporting/importing data

    ORA-01555: snapshot too old: rollback segment number with the name "" too small

    ORA-22924: snapshot too old

    We have already set aside retention to 50000 .table structure are:

    SQL > show Cancel parameter

    VALUE OF TYPE NAME

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

    UNDO_MANAGEMENT string AUTO

    UNDO_RETENTION integer 50000

    undo_tablespace string UNDOTBS1

    SQL > alter table hclm_admin. SCAN_UPLOADEDFILES_TEMP modify lob (FILE_BLOB) (RETENTION);

    Modified table.

    SQL > select nom_de_colonne, pctversion and retention

    from dba_lobs where owner = 'HCLM_ADMIN' and table_name = "SCAN_UPLOADEDFILES_TEMP";

    COLUMN_NAME

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

    PCTVERSION RETENTION

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

    FILE_BLOB

    50000

    SQL > alter table hclm_admin. TPA_FAXWATCHER modify lob (FILEDATA_BLOB) (RETENTION);

    Modified table.

    SQL > select column_name, pctversion and retention of dba_lobs where owner = 'HCLM_ADMIN' and table_name = "SCAN_UPLOADEDFILES_TEMP";

    Column_name PCTVERSION RETENTION

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

    FILE_BLOB

    50000

    CREATE TABLE HCLM_ADMIN. TPA_FAXWATCHER

    (

    FILENAME_VAR VARCHAR2 (50 BYTE),

    DATE OF CREATED_DATE_DTE,

    FILEPATH_VAR VARCHAR2 (100 BYTE),

    DATE OF TIMESTAMP_DTE,

    FAXNO_VAR VARCHAR2 (15 BYTE),

    DEPARTMENT_VAR VARCHAR2 (50 BYTE),

    REQUESTTYPE_VAR VARCHAR2 (50 BYTE),

    TAGTO_VAR VARCHAR2 (50 BYTE),

    REMARK_VAR VARCHAR2 (1000 BYTE),

    DOCTYPE_VAR VARCHAR2 (50 BYTE),

    TAGTOVALUE_VAR VARCHAR2 (50 BYTE),

    DOCTYPE_OTHER_VAR VARCHAR2 (50 BYTE),

    HEGIC_NO_VAR VARCHAR2 (50 BYTE),

    RECORDNO_NUM NUMBER OF NON-NULL,

    FILEDATA_BLOB BLOB,

    DATE OF FAXLOCKDATE_DTE,

    NUMBER OF FAXLOCKSTATUS_VAR

    FAXLOCKBYUSER_VAR VARCHAR2 (50 BYTE)

    )

    (STORE AS) LOB (FILEDATA_BLOB)

    TABLESPACE HCLM_ALERTSVC

    ALLOW ONLINE STORAGE

    8192 CHUNK

    RETENTION

    NOCACHE

    LOGGING

    INDEX)

    TABLESPACE HCLM_ALERTSVC

    STORAGE)

    64K INITIALS

    ACCORDING TO 1 M

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    ))

    STORAGE)

    64K INITIALS

    ACCORDING TO 1 M

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    ))

    TABLESPACE HCLM_ALERTSVC

    PCTUSED 0

    PCTFREE 10

    INITRANS 1

    MAXTRANS 255

    STORAGE)

    64K INITIALS

    ACCORDING TO 1 M

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    )

    LOGGING

    NOCOMPRESS

    NOCACHE

    NOPARALLEL

    MONITORING;

    ALTER TABLE HCLM_ADMIN. (ADD) TPA_FAXWATCHER

    KEY ELEMENTARY SCHOOL

    (RECORDNO_NUM)

    USING INDEX

    TABLESPACE HCLM_ALERTSVC

    PCTFREE 10

    INITRANS 2

    MAXTRANS 255

    STORAGE)

    64K INITIALS

    ACCORDING TO 1 M

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    ));

    CREATE TABLE HCLM_ADMIN. SCAN_UPLOADEDFILES_TEMP

    (

    NUMBER OF TEMPID_NUM

    SESSION_ID VARCHAR2 (200 BYTE),

    NUMBER OF UPLOADFILE_NUM

    NUMBER OF DOCNO_NUM

    NUMBER OF SCANJOB_NUM

    FILENAME_VAR VARCHAR2 (200 BYTE),

    FILETYPE_VAR VARCHAR2 (200 BYTE),

    FILE_BLOB BLOB,

    VARCHAR2 (200 BYTE) FLAG,

    NUMBER OF USERID_NUM

    CREATED_DATE DATE

    )

    (STORE AS) LOB (FILE_BLOB)

    TABLESPACE PHCLMDBTBS

    ALLOW ONLINE STORAGE

    8192 CHUNK

    RETENTION

    NOCACHE

    LOGGING

    INDEX)

    TABLESPACE PHCLMDBTBS

    STORAGE)

    64K INITIALS

    ACCORDING TO 1 M

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    ))

    STORAGE)

    64K INITIALS

    ACCORDING TO 1 M

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    ))

    TABLESPACE PHCLMDBTBS

    PCTUSED 0

    PCTFREE 10

    INITRANS 1

    MAXTRANS 255

    STORAGE)

    64K INITIALS

    ACCORDING TO 1 M

    MINEXTENTS 1

    MAXEXTENTS UNLIMITED

    PCTINCREASE 0

    DEFAULT USER_TABLES

    )

    LOGGING

    NOCOMPRESS

    NOCACHE

    NOPARALLEL

    MONITORING;

    Kind regards

    Hello

    First check the lob corrupt as:

    SQL > create table corrupted_lob_data (corrupted_rowid rowid);

    Table created.

    SQL > set off concat

    SQL >

    declare

    SQL > error_1555 exception;

    pragma exception_init (error_1555,-1555);

    number num.

    Start

    for cursor_lob in (select rowid r, & lob_column of table_owner. & table_with_lob) loop

    Start

    NUM: = dbms_lob.instr (. cursor_lob & lob_column, hextoraw ('889911'));

    exception

    When error_1555 then

    insert into corrupted_lob_data values (cursor_lob.r);

    commit;

    end;

    end loop;

    end;

    2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

    17.

    Enter the value of lob_column: FILE_BLOB

    Enter the table_owner value: hclm_admin

    Enter the value of table_with_lob: SCAN_UPLOADEDFILES_TEMP

    former 6: for cursor_lob in (select rowid r, & lob_column of table_owner. & table_with_lob) loop

    6 news: for cursor_lob (select rowid r, FILE_BLOB of hclm_admin loop SCAN_UPLOADEDFILES_TEMP.)

    old 8: num: = dbms_lob.instr (. cursor_lob & lob_column, hextoraw ('889911'));

    8 new: num: = dbms_lob.instr (cursor_lob. FILE_BLOB, hextoraw ('889911'));

    PL/SQL procedure successfully completed.

    SQL > select * from corrupted_lob_data;

    CORRUPTED_ROWID

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

    AAASF/AAKAABacyAAA

    To resolve this problem, we have 3 options

    (1) to restore and recover the LOB segment using physical backup.

    (2) empty LOBs affected using the UPDATE, as mentioned in the Note 787004.1statement:

    SQL > update SCAN_UPLOADEDFILES_TEMP

    Set FILE_BLOB = empty_blob()

    where rowid in (select corrupted_rowid

    of corrupted_lob_data);

    SQL > commit;

    (3) perform the export, excluding the corrupt ROWID. by adding the following to export command parameter

    Query =------"where rowid not in (\'AAASF/AAKAABacyAAA\'\) \ \" "

    Kind regards

    Alok Dwivedi

  • Error - ORA-01422: exact fetch returns more than number of lines

    Hello

    I get the error when running script below. Please help me.

    /****************** ERROR ******************/

    Error report:
    ORA-01422: exact fetch returns more than number of lines
    ORA-06512: at line 71
    01422 00000 - "exact fetch returns more than number of lines."
    * Cause: Exact extraction specified number is less than the returned rows.
    * Action: Rewrite the query or change the number of rows requested



    /****************** SCRIPT ******************/

    DECLARE

    l_xml XMLTYPE: = XMLTYPE ("< LoggingInformation >
    < commandeEmplacement >
    < name > ServiceCall1 < / name >
    < StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
    < EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
    < ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
    < status > completed < / status >
    < ExceptionMessage > error here... < / ExceptionMessage >
    < ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
    < ServiceLoggingEntries >
    < item >
    < foo > 1 < / foo >
    < / ServiceInformation >
    < item >
    < foo > 2 < / foo >
    < / ServiceInformation >
    < / ServiceLoggingEntries >
    < InformationLoggingEntries >
    < ProcessInformation >
    < bar > 1 < / >
    < / ProcessInformation >
    < ProcessInformation >
    < bar > 2 < / >
    < / ProcessInformation >
    < / InformationLoggingEntries >

    < / commandeEmplacement >
    < commandeEmplacement >
    < name > ServiceCall2 < / name >
    < StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
    < EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
    < ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
    < status > completed < / status >
    < ExceptionMessage > error here... < / ExceptionMessage >
    < ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
    < ServiceLoggingEntries >
    < item >
    < foo > 3 < / foo >
    < / ServiceInformation >
    < item >
    < foo > 4 < / foo >
    < / ServiceInformation >
    < / ServiceLoggingEntries >
    < InformationLoggingEntries >
    < ProcessInformation >
    < bar > 3 < / >
    < / ProcessInformation >
    < ProcessInformation >
    < bar > < / > 4
    < / ProcessInformation >
    < / InformationLoggingEntries >
    < / commandeEmplacement >

    < commandeEmplacement >
    < name > ServiceCall3 < / name >
    < StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
    < EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
    < ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
    status of <>failed < / status >
    < ExceptionMessage > error here... < / ExceptionMessage >
    < ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
    < / commandeEmplacement >
    (< / LoggingInformation > ');

    v_txt VARCHAR2 (2000);

    BEGIN

    SELECT XMLTYPE. Extract (value (TT),'/ CommandInformation/Name/Text () '). GETSTRINGVAL()
    IN v_txt
    TABLE (XMLSEQUENCE (l_xml. Extract('/LoggingInformation/CommandInformation'))) tt;

    DBMS_OUTPUT. Put_line (v_txt);

    END;

    Select...

    means only 1 row can be returned.

    Your select returns more than one line.
    Change v_txt in a collection, define a cursor and the extraction of it or change the statement, i.e. it returns a single line.

    ---------
    Sybrand Bakker
    Senior Oracle DBA

  • Unable to connect to the database instance: ORA-28001: the password has expired

    Hi all

    I'm on oracle 11g grid.


    I get unable to connect to the database instance: ORA-28001: the password has expired (ERROR of DBD: OCISessionBegin) error.

    I checked and found that my user dbsnmp expired password. I found the page on the grid control to change the password of user dbsnmp.

    but I want to know. If I changed dbsnmp password using the grid control. Is there any other task I have to do after the change of user dbsnmp password.

    Please let me know.


    Thank you

    Hi PK,.

    If GC can reuse the monitored GENERAL to connect to the database account I can't think of anything you should do.
    The database, what has happened is an 11g database? If so the security policy has been changed in this version, which means that in half a year you will still have a locked account of DBSNMP.

    If your company security policy allows, you can avoid this by changing the password_life_time to an unlimited number of default profile:
    change the default profile limit password_life_time unlimited;

    Eric

  • reduce the number of columns in the case query

    Hi all

    I'm running on 10 G R/2.

    I have a query that produces columns with the number of steps.

    SUM (CASE WHEN LTRIM (RTRIM (W_O)) = 'ROKOLBIN' THEN 1 ELSE 0 END) AS "O_ROKOLBIN."
    SUM (CASE WHEN LTRIM (RTRIM (W_I)) = 'ROKOLBIN' THEN 0 OTHERWISE 1 END) AS "I_ROKOLBIN."
    sum (case when LTRIM (RTRIM (W_O)) = "SYLVAIN", then 1 else 0 end) as "O_GULURU."
    sum (case when LTRIM (RTRIM (W_I)) = "SYLVAIN", then 1 else 0 end) as "I_GULURU."
    sum (case when LTRIM (RTRIM (W_ON)) = 'PURE' then 1 else 0 end) as "O_PURE."

    I want to reduce the number of columns to 2,

    A column is for Division.Division can be O_ROKOLBIN, I_ROKOLBIN, O_GULURU, I_GULURU, O_PURE
    The other column is Subtotal.Subtotal are the sums as above, SUM (CASE WHEN LTRIM (RTRIM (W_O)) = "ROKOLBIN", 1.)

    Can anyone advie how I acheiev it.

    Thank you.

    Hello

    CrackerJack wrote:
    ... Data are from Jan 12 to today, 1 million + records, that's why I'm unable to provide comprehensive data and simply copied an example of data.

    Nobody wants you to post 1 million rows. 10 lines can be many. Just examples of data make sure that validation really produces the results you post.
    >

    I copied data from 16 Jan just differentiate different dates.

    I also tried trunc, but who has still not the sum of each divisions.

    Highlight a few places where the query I posted produces erroneous results and explain how to get good results in these places. Give concrete examples showing how to get the correct results of the sample data.

  • ORA-33288: another user has inconsistent access to the analytic workspace

    Gurus

    A customer of our meeting suite error when make action (refresh the data) of the responsibility for the EBiz project portfolio analysis

    # # 0 in detail java.sql.SQLException: ORA-34344: FPA analytic workspace. FPAPJP is not attached.
    ORA-06512: at the 'APPS '. FPA_UTILITIES_PVT', line 129
    ORA-06512: at the 'APPS '. FPA_PROCESS_PVT', line 2467
    ORA-33272: FPA analytic workspace. Cannot open FPAPJP.
    ORA-33288: another user has inconsistent access to the analytic workspace FPA. FPAPJP and the timeout has expired.
    ORA-06512: at line 1

    I searched the documentation of OLAP, metalink, google, but all simply suggest "Expect that the conflict is over.". We waited and asked their DBA to check active connections, but none has proven to help us.

    Issues related to the:
    ======
    1. how to avoid this error?
    2. How do I know the number of users / user information connected to the FPAPJP workspace?
    3. How can we close these sessions?

    Really appreciate your inputs.

    Thank you
    Charlene

    # 1, it seems that the process is trying to detach a workspace that is not attached. Just check in your code if you try off somewhere and work space is not attached.

    Thank you
    Brijesh

  • ERRO ORA-01422: exact fetch returns more than number of lines

    SET SERVEROUTPUT ON
    create or replace procedure copy
    AS

    cursor c2 IS
    Select t.country_code
    transactions t;

    v_lc_details_current_hist c2% rowtype;
    v_country_code transactions.country_code% TYPE;

    Start


    Open c2;
    loop

    extract the c2 in v_lc_details_current_hist;


    OUTPUT WHEN c2% NOTFOUND;



    Select the country_code in v_country_code of transactions;

    DBMS_OUTPUT. Put_line (v_country_code);

    end loop;

    Close c2;

    end;
    /



    I'm gettintha error ORA-01422: exact fetch returns more than number of lines

    Please help me

    [email protected] wrote:
    Select the country_code in v_country_code of transactions;
    -It's to return several rows, and the SELECT INTO statement expects that one line.

    A SELECT INTO statement can be used if you want a query to return only one row. Otherwise use bulk collect and a variable of class to contain the result lines multiples.

Maybe you are looking for

  • Docking station ruin the battery?

    HelloMy old laptop was a something Lenovo that has been duplicated for me 1 and the same version for my parents...I use to keep my AC when 100% or my battery out when I'm at home. |While they were trendy - overload 24/7...After 2 years mine was still

  • Date security upward for Windows Vista (KB2644615)

    Date of security upward for Windows Vista (KB2644615) has my computer in a loop of the installation, how to fix this?

  • Why my icons on my desktop keep changing

    My favorite site icons keep changing to blue globe just out of the blue.  How can I stop this?

  • Phone call warned that a "hacker" attempts to access my computer.

    I just got a phone call indicating that a 'hacker' was trying to acess my Windows operating system.  I was instructed to go to the computer and follow the instructions.  I don't have that.  What is a legal appeal or a scam?

  • Special character restrictions

    HelloI have a situation, the restriction of special characters on address fields.As I know, by partial dynamic action and below the code useful to achieve this.Here is the piece of code to restrict the special characters...Cadd string = pageContext.g