Procedure is not reading/returns all values

The SP below reads in business_date as an input parameter.
The procedure should calculate this value MAX in a range
(ln_business_date) and this value must be used throughout the rest of the
operating mode.
  SELECT MAX(business_date
      INTO ln_business_date
      FROM proof;
The procedure returns the name of 'missing_tbl_name' of the INTO clause as the OUT parameter
However, the performance of the SP_MONTHLY_ASSET procedure below I don't get not all values. The procedure
Compiles without error but I think that my procedure is bad work and not read or return values
correctly.

Any help is greatly appreciated.

CREATE OR REPLACE PROCEDURE SP_MONTHLY_ASSET(
    business_dt_num IN NUMBER DEFAULT NULL, 
    missing_tbl_name OUT NOCOPY VARCHAR2
)
IS
   ln_business_dt_num NUMBER;
   bad_date_value EXCEPTION;
BEGIN
   IF business_dt_num < 0 
   THEN
      RAISE bad_date_value;
   ELSE
    SELECT MAX(business_dt_num)
      INTO ln_business_dt_num 
      FROM sasor.dp_ca_proof@psasr

      SELECT data_table_name
      INTO missing_tbl_name 
      FROM ( 
         SELECT whatever 
         FROM tablename
         WHERE some_condition MINUS 
         ( 
         SELECT whatever
         FROM secondtablename
         WHERE business_dt_num = ln_business_dt_num 
          UNION 
         SELECT whatever 
         FROM tablename
         WHERE business_dt_num = to_number( substr('&datenum',1,6) || '01' ) 
         )
           );
   end if;
EXCEPTION
    WHEN bad_date_value 
   THEN
      raise_application_error ( -10001, 'Incorrect date ...');
END;

There is an exception no_data_found because there was no data found. This subquery:

         SELECT UPPER(data_table_name) data_table_name
         FROM filespec
         WHERE data_table_name IN ('SSBBALIN', 'LPLAPRA',
         'DSTASSET', 'EDJBALIN', 'APLASSET', 'HARTFORDDC',
         ' WLFBALIN', ' MSTBALIN', ' STFAPRA', ' RJABALIN',
         ' JYMAPRA', ' RBCBALIN', ' UBSBALIN',
         ' MERRILL_UMA_MAN', ' MERRILL_MAA_MAN') MINUS (
         SELECT UPPER(fus_data_table_name)
         FROM dp
         WHERE business_date = ln_business_date
         AND fus_data_table_name IN (' SSBBALIN',' LPLAPRA',
         ' MGNAPRA', ' DSTASSET', ' EDJBALIN', ' APLASSET',
         ' HARTFORDDC',  ' MSTBALIN', ' STFAPRA',
         ' RJABALIN', ' JYMAPRA', ' RBCBALIN', ' UBSBALIN',
         ' MERRILL_UMA_MAN', ' MERRILL_MAA_MAN')
         GROUP BY UPPER(fus_data_table_name) UNION
         SELECT UPPER(fus_data_table_name)
         FROM dp
         WHERE business_date = to_number( substr('201111',1,6) || '01' )
         AND fus_data_table_name = 'HARTFORDDC'
         GROUP BY UPPER(fus_data_table_name) )

Nothing found. If you want to return just ' lack of support: "If the subquery is empty when what you need is:

BEGIN
  SELECT 'Missing Load : ' || data_table_name
       INTO missing_tbl_name
      FROM (
         SELECT UPPER(data_table_name) data_table_name
         FROM filespec
         WHERE data_table_name IN ('SSBBALIN', 'LPLAPRA',
         'DSTASSET', 'EDJBALIN', 'APLASSET', 'HARTFORDDC',
         ' WLFBALIN', ' MSTBALIN', ' STFAPRA', ' RJABALIN',
         ' JYMAPRA', ' RBCBALIN', ' UBSBALIN',
         ' MERRILL_UMA_MAN', ' MERRILL_MAA_MAN') MINUS (
         SELECT UPPER(fus_data_table_name)
         FROM dp
         WHERE business_date = ln_business_date
         AND fus_data_table_name IN (' SSBBALIN',' LPLAPRA',
         ' MGNAPRA', ' DSTASSET', ' EDJBALIN', ' APLASSET',
         ' HARTFORDDC',  ' MSTBALIN', ' STFAPRA',
         ' RJABALIN', ' JYMAPRA', ' RBCBALIN', ' UBSBALIN',
         ' MERRILL_UMA_MAN', ' MERRILL_MAA_MAN')
         GROUP BY UPPER(fus_data_table_name) UNION
         SELECT UPPER(fus_data_table_name)
         FROM dp
         WHERE business_date = to_number( substr('201111',1,6) || '01' )
         AND fus_data_table_name = 'HARTFORDDC'
         GROUP BY UPPER(fus_data_table_name) ));
EXCEPTION
  WHEN no_data_found THEN
    missing_tbl_name := 'Missing Load : ';
END;

Tags: Database

Similar Questions

  • Need help to create a search form that returns all values on this line

    Hello

    I have a pdf document that lists every zip code unique to the USA and for each line, it has five columns of information for each zip.  Using the integrated search, when the user key a zip code, the cursor jumps to that page and highlights only the postal code, making it difficult to read the other five columns.

    Not sure if this is possible, but it would be the ideal solution:

    Enter the postal Code: [search] _ <-user key a zip code if found, return all columns in the same row in the report below

    Group:                    ___________

    Description of the Group: _

    Mkt Area                 ____________

    City                         ____________

    State                      ___

    This can be done (in the PDF file), but it requires a script to measure.

    The worksheet data should be converted to a crude and attached text to the PDF file, and then the script could read and fill in the fields on this basis.

    If you are interested in hiring someone to develop this script for you, feel free to contact me privately at try6767 at gmail.com

  • Global has not read breast all loop - but Local is

    I have a face before written to a variable switch, so it should be read in a while loop.   If the variable is local, it is read and my code works, but I need to do a Subvi the inner loop, so it seems I have to use a global variable - but then it is not read, and the code does not work.  I am very new to Labview and I do not remember this difference being made watch anywhere.  I posted a very simple example.

    Instructions: Click on SW - LV, the beginning of the inner loop; Turn the switch off, inner loop stops.  Click on SW - GV to start the inner loop, but the inner loop does not stop by turning the switch.  If I go on the front of the SW - GV I can stop the inner loop.

    Any help woud be appreciated.

    I use Labview 2011 assessment and Windows 7.

    You are a little out of your reasoning.  I'll explain what continues.

    The outer loop runs in the lower loop and the inner loop runs once per iteration of the outer loop until the value of SW - LV is True. Then the inner loop starts reading the value of SW - LV each iteration until what you press the SW - LV thw to witch point passes the value of SW - LV (believe me, tearing up the Local write on and it works the same)

    The top loop: outer loop runs and the inner loop runs once per iteration of the outer loop until the value of SW - GV is true AND The Global is written.  Global cannot be written again in this loop as the outer loop is waiting for the inner loop at the end (you have a classic blocking!)  Written across the world elsewhere (as from global itself, breaks the deadlock)

  • Basic stored procedure helps - not the return data

    Hi all:

    To be fair, I come from a SQL Server environment and have never written anything for PL/SQL / Oracle before, this is my first attempt, so if nothing is better or more effective, please let me know. The immediate problem I'm having is, I have the following stored procedure, and all I want to do is return the data in the table, so that I can fill my DataSet in code. But when I run the code against this stored procedure, it still don't bring back any data (if I just do a standard "SELECT * FROM lkAllocation", I get the results, so I know data are there and the connection is good). If execution of the procedure in my window in Oracle SQL Developer (call PAYSOL.spallocationselectall ();), my results displays no data as well. What is the problem with this stored procedure?


    create or replace
    PROCEDURE spAllocationSelectAll IS
    Whole AllocationID;
    AllocationName Varchar2 (50);

    BEGIN
    AllocationID: = 0;
    AllocationName: = ";

    SELECT
    AllocationID,
    AllocationName
    IN
    AllocationID,
    AllocationName
    Of
    lkAllocation
    ORDER BY
    AllocationName;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHILE OTHERS THEN
    -Consider recording the error and then re-raise
    LIFT;
    END spAllocationSelectAll;

    Well, I'm not really in .net (I would participate in another forum so ;)), but this might be useful?

    Value (Oracle.DataAccess.Types)      System.Data.DbType      OracleDbType
    OracleRefCursor      Object      RefCursor
    

    http://download.Oracle.com/docs/CD/B19306_01/win.102/b14307/featOraCommand.htm#g1025379
    http://download.Oracle.com/docs/CD/B19306_01/win.102/b14307/featOraCommand.htm#g1025072

    Perhaps the [forum Windows and .net | http://forums.oracle.com/forums/category.jspa?categoryID=44] is worth a try as well.

  • Files Sony XAVC F55 does not read at all and cause glitches since update today - Dec 13

    Hello

    Since the first update today all files Sony XAVC I have in my projects is no longer read and cause big enough seeds. Yesterday, everything was just fine until I updated. Does anyone have any info on this? In the hope of a quick enough patch as he made a time sensitive project I'm on impassable.

    Thank you

    Try to delete the Cache and reset the preferences.

  • Spoil the assignment after PDF download, now can not read PDF, all icons become a PDF icon, another program could not be used

    Gentlemen.

    Please help solve the problem

    Recently, download some programs to watch a movie. accidentally put adobe pdf as a major program opening program. following this, can't open some programs of miscrosoft as excel.

    He indicated that the links are missing for the opening of some programs and some icons becomes icon PDF too. can't do the printscreen.

    See
    to solve your EXE association problem
     
  • subquery returns no row in the main query, but hard returns the value of the master query

    Oracle 11g, Solaris SPARC 64-bit:

    This is the master query: its not to return all the lines

    Select count (*) in the sadmin.usr_mods where to_char (ts_id) in ((select to_char (rtrim (ltrim(TS_MODULES,','), ',')) in the sadmin.usr_rfc where TS_KINTANA_PACKAGE_NUMBER = '123' and ts_projectid = 3));

    COUNT (*)

    ----------

    0

    But wherever if I use subquery only returns he lines:

    SQL > select rtrim (ltrim(TS_MODULES,','), ',') from the sadmin.usr_rfc where TS_KINTANA_PACKAGE_NUMBER = '123' and ts_projectid = 3;

    RTRIM (LTRIM(TS_MODULES,','), ',')

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

    49,54

    If I use these values as hardcoded to a select master it will return 2 rows:

    SQL > select count (*) in the sadmin.usr_mods where to_char (ts_id) in ('49 ', ' 54');

    COUNT (*)

    ----------

    2

    TS_MODULES datatype is CLOB

    TS_ID datatype is set to number

    Help, please

    with

    usr_rfc as

    (select 3 ts_projectid, 123 ts_kintana_package_number, to_clob(',49,54,') ts_modules

    of the double

    ),

    usr_mods as

    (select ts_id 49 Union double all the)

    Select 50 in all double union

    Select double 54

    )

    Select count (*)

    of usr_mods

    where to_char (ts_id) in (select regexp_substr (to_char (rtrim (ltrim(TS_MODULES,','), ',')),'[^,] +', 1, level))

    of usr_rfc

    where TS_KINTANA_PACKAGE_NUMBER = '123'

    and ts_projectid = 3

    connect by level<= regexp_count(to_char(rtrim(ltrim(ts_modules,','),',')),',')="" +="">

    )

    COUNT (*)
    2

    Concerning

    Etbin

    Select count (*)

    of usr_mods

    where instr ((select ',' | to_char (rtrim (ltrim(TS_MODULES,','), ',')) |)) ','

    of usr_rfc

    where TS_KINTANA_PACKAGE_NUMBER = '123'

    and ts_projectid = 3

    ),

    ',' || TO_CHAR (TS_ID) | ','

    ) > 0

  • Procedure does not--a number not valid online 12

    Question: Dear professional PL/SQL! I'm a little desperate as my procedure does not work for all my variables. The debugger in SQL-Developer produces a message error "invalid number on line 12. I checked back and fourth but can't find any error.

    You can find the bug or lead my on the right track?

    Here are some example data:

    P_CNT_GEBIET =' 5630-372
    P_STR_LRT = '9170'
    P_WG = 5
    P_BE = 1

    Curious is the fact that it works perfectly when P_STR_LRT is '9110'. With '9170' or '9171' it doesn't work anymore.

    Any help is greatly appreciated.

    BR,

    SEB

    My Proc:
    create or replace
    PROCEDURE PROC_TBL_MATRIX_INTMED_CE
      (
        P_CNT_GEBIET          VARCHAR2,
        P_STR_LRT             VARCHAR2,
        P_BE                  NUMBER,
        P_WG                  NUMBER)
    AS
    BEGIN
      DECLARE
        CNUMBER  number;
    
      BEGIN
      
      SELECT COUNT(*)
        INTO CNUMBER
        FROM TBL_MATRIX_INTERMEDIATE_RESULT
        WHERE LNG_GEBIET = P_CNT_GEBIET
        AND STR_LRT_CLASS      = P_STR_LRT
        AND INT_BE       = P_BE
        AND INT_WG       = P_WG
        AND EVAL_TYPE    = 2;
        
     IF CNUMBER = 0 THEN
      
     INSERT INTO TBL_MATRIX_INTERMEDIATE_RESULT (LNG_BAUMART, STR_BA_LANG, STR_BA_KAT, STR_BA_GRUPPE, INT_PROZENT, INT_SELTEN, EVAL_TYPE, FLAG, LNG_GEBIET, STR_LRT_CLASS, INT_WG, INT_BE, STR_GEWERTET)
     SELECT 
    Z.CNT_BAUMART, Z.BA_LANG, Z.BA_KAT, Z.BA_GRUPPE, Z.PROZENT, DECODE(Z.BA_KAT,'B','von Natur aus selten') AS SELTEN, 2, 0, P_CNT_GEBIET, P_STR_LRT, P_WG, P_BE,
    CASE WHEN Z.CNT_BAUMART = 74 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (5, 6, 7, 8, 9, 81))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 72 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (22,23,24,25,26,27))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 71 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (46,47))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 54 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (13, 14, 15))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 53 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (28,29,30,31,32,33,79))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 78 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (62))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.BA_KAT = 'N' AND Z.PROZENT > 1 THEN 'Ja' 
    WHEN Z.BA_KAT = 'H' AND Z.PROZENT > 1 THEN 'Ja' 
    WHEN Z.BA_KAT = 'P' AND Z.PROZENT > 1 THEN 'Ja' 
    WHEN Z.BA_KAT = 'B' AND Z.PROZENT !=0 THEN 'Ja' ELSE 'Nein' END AS GEWERTET
    FROM ((SELECT
    B.CNT_BAUMART,
    B.BA_LANG,
    X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT,
    X.BA_GRUPPE
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT, X.BA_GRUPPE
    )
    UNION ALL
    (SELECT DISTINCT R.CNT_BAUMART, R.BA_LANG, D.BA_KAT, 
    NULL PROZENT, 
    DECODE(R.BA_GRUPPE,1,'Ba-Grp. 1',2,'Ba-Grp. 2',3,'Ba-Grp 3',4,'Ba-Grp. 4',5,'Ba-Grp. 5',6,'Ba-Grp. 6',7,'Ba-Grp. 7',8,'Ba-Grp. 8') BA_GRUPPE
    FROM VT_TBL_BAUMART R, VT_TBL_MATRIX_CUSTOM_EVAL D
    WHERE 
    R.CNT_BAUMART = D.LNG_BAUMART
    AND (D.LRT_CLASS = P_STR_LRT)
    AND D.BA_KAT IN ('B','H', 'P', 'N')
    AND (R.CNT_BAUMART NOT IN (SELECT DISTINCT
    B4.CNT_BAUMART
    FROM 
    VT_TBL_BESTAND V4,
    VT_PUNKTDATEN_JOIN P4,
    VT_TBL_BAUMART B4,
    VT_TBL_MATRIX_CUSTOM_EVAL X4
    WHERE 
    (P4.CNT_GEBIET = P_CNT_GEBIET)
    AND (V4.LNG_BAUMART = B4.CNT_BAUMART) 
    AND (V4.LNG_INV_PT_ID = P4.INV_PT_ID_SUB)
    AND (P4.STR_LRT_MAIN = P_STR_LRT)
    AND (P4.INT_WG = P_WG)
    AND (P4.INT_BE_MAIN = P_BE)
    AND (P4.INT_STATUS_SUB = 3)
    AND (X4.LNG_GEBIET= P_CNT_GEBIET)
    AND (X4.LRT_CLASS = P_STR_LRT)
    AND (X4.INT_WG = P_WG)
    AND (X4.INT_BE = P_BE)
    AND (X4.LNG_BAUMART=V4.LNG_BAUMART))))
    ) Z
    GROUP BY 
     CNT_BAUMART, BA_LANG, BA_KAT, BA_GRUPPE, PROZENT 
    UNION
    SELECT NULL, 'Gewertete BA > 1%' BA_LANG, NULL, NULL, NULL, NULL, 2, 1, P_CNT_GEBIET, P_STR_LRT, P_WG, P_BE, (SELECT TO_CHAR(COUNT(GEWERTET)) GEWERTET FROM (SELECT
    Z.CNT_BAUMART, Z.BA_KAT, Z.BA_GRUPPE, Z.PROZENT ,
    CASE WHEN Z.CNT_BAUMART = 74 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (5, 6, 7, 8, 9, 81))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 72 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (22,23,24,25,26,27))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 71 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (46,47))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 54 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (13, 14, 15))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 53 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (28,29,30,31,32,33,79))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.CNT_BAUMART = 78 AND Z.PROZENT IS NOT NULL AND (SELECT COUNT(*) FROM(SELECT
    B.CNT_BAUMART, B.BA_LANG, X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    AND (B.CNT_BAUMART IN (62))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT
    )) = 0 THEN 'Ja'
    WHEN Z.BA_KAT = 'N' AND Z.PROZENT > 1 THEN 'Ja' 
    WHEN Z.BA_KAT = 'H' AND Z.PROZENT > 1 THEN 'Ja'
    WHEN Z.BA_KAT = 'P' AND Z.PROZENT > 1 THEN 'Ja' 
    WHEN Z.BA_KAT = 'B' AND Z.PROZENT !=0 THEN 'Ja' ELSE 'Nein' END AS GEWERTET
    FROM ((SELECT
    B.CNT_BAUMART,
    B.BA_LANG,
    X.BA_KAT,
    SUM(V.DBL_BESTAND) * 100 / (SELECT SUM(V2.DBL_BESTAND)
                                       FROM   VT_TBL_BESTAND     V2,
                                              VT_PUNKTDATEN_JOIN P2
                                       WHERE  (P2.CNT_GEBIET = P_CNT_GEBIET)
                                       AND    (V2.LNG_INV_PT_ID = P2.INV_PT_ID_SUB)
                                       AND    (P2.STR_LRT_MAIN = P_STR_LRT)
                                       AND    (P2.INT_WG = P_WG)
                                       AND    (P2.INT_STATUS_SUB = 3)
                                       AND (P2.INT_BE_MAIN = P_BE)) AS PROZENT,
    X.BA_GRUPPE
    FROM 
    VT_TBL_BESTAND V,
    VT_PUNKTDATEN_JOIN P,
    VT_TBL_BAUMART B,
    VT_TBL_MATRIX_CUSTOM_EVAL X
    WHERE 
    (P.CNT_GEBIET = P_CNT_GEBIET)
    AND (V.LNG_BAUMART = B.CNT_BAUMART) 
    AND (V.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
    AND (P.STR_LRT_MAIN = P_STR_LRT)
    AND (P.INT_WG = P_WG)
    AND (P.INT_BE_MAIN = P_BE)
    AND (P.INT_STATUS_SUB = 3)
    AND (X.LNG_GEBIET= P_CNT_GEBIET)
    AND (X.LRT_CLASS = P_STR_LRT)
    AND (X.INT_WG = P_WG)
    AND (X.INT_BE = P_BE)
    AND (X.LNG_BAUMART = V.LNG_BAUMART)
    AND (X.BA_KAT IN ('B','H', 'P', 'N'))
    GROUP BY B.CNT_BAUMART, B.BA_LANG, X.BA_KAT, X.BA_GRUPPE
    )
    UNION ALL
    (SELECT DISTINCT R.CNT_BAUMART, R.BA_LANG, D.BA_KAT, 
    NULL PROZENT, 
    DECODE(R.BA_GRUPPE,1,'Ba-Grp. 1',2,'Ba-Grp. 2',3,'Ba-Grp 3',4,'Ba-Grp. 4',5,'Ba-Grp. 5',6,'Ba-Grp. 6',7,'Ba-Grp. 7',8,'Ba-Grp. 8') BA_GRUPPE
    FROM VT_TBL_BAUMART R, VT_TBL_MATRIX_CUSTOM_EVAL D
    WHERE 
    R.CNT_BAUMART = D.LNG_BAUMART
    AND (D.LRT_CLASS = P_STR_LRT)
    AND D.BA_KAT IN ('B','H', 'P', 'N')
    AND (R.CNT_BAUMART NOT IN (SELECT DISTINCT
    B4.CNT_BAUMART
    FROM 
    VT_TBL_BESTAND V4,
    VT_PUNKTDATEN_JOIN P4,
    VT_TBL_BAUMART B4,
    VT_TBL_MATRIX_CUSTOM_EVAL X4
    WHERE 
    (P4.CNT_GEBIET = P_CNT_GEBIET)
    AND (V4.LNG_BAUMART = B4.CNT_BAUMART) 
    AND (V4.LNG_INV_PT_ID = P4.INV_PT_ID_SUB)
    AND (P4.STR_LRT_MAIN = P_STR_LRT)
    AND (P4.INT_WG = P_WG)
    AND (P4.INT_BE_MAIN = P_BE)
    AND (P4.INT_STATUS_SUB = 3)
    AND (X4.LNG_GEBIET= P_CNT_GEBIET)
    AND (X4.LRT_CLASS = P_STR_LRT)
    AND (X4.INT_WG = P_WG)
    AND (X4.INT_BE = P_BE)
    AND (X4.LNG_BAUMART=V4.LNG_BAUMART))))
    ) Z
    ) WHERE GEWERTET = 'Ja') PROZENT FROM DUAL; 
    END IF;
      END;
    END PROC_TBL_MATRIX_INTMED_CE;

    Hello

    It's a question of data.

    All the values you pass for column LNG_GEBIET?

    Concerning
    AJR

  • Returns all occurrences of a substring

    Hello
    I have a problem with the reference to the data in a list.
    I can contain the values of the fields such as (going after MTC):

    * MOCS13; MTCIN13; MTCIN14; 100-14; 111 IN IN 14; 123 14
    * MTCIN13; MTCIN14; 100-14; 111 IN IN 14; 123 14
    * MOCS13; MTCIN13; MTCIN14
    * MOCS13; M100IN14; 111 TO 14; 123 IN 14
    * ...


    * MTCXXX can have different sizes and can be anywhere in the area.
    * The cams of information in a list, so it is ordered, if there is more then a TCM it will be come to the front.
    * "MTC" is always;


    first of all, I just need to check if the information exists, then I did this:
    Decode (REGEXP_SUBSTR (Upper (Concat(';',List)), Upper(';) MTC ^; +')), NULL, 'FALSE', 'TRUE') AS MTC

    and it was OK

    then there was asked to return the value full and I did this:
    NVL (substr (REGEXP_SUBSTR (Upper (Concat(';',List)), Upper(';) MTC; +')), length(';mtc')-2, length (REGEXP_SUBSTR (Concat ('; ', List),';)) MTC; +'))),' ') IN TCM

    now that I did this, I was told that there may be several occurrences and that I must return all values!
    I ordered the list to make this easy, but I'm not currently in a position to get the right expression to get the set of values!
    can someone help me?

    Thank you
    Ricardo Tomas

    And if you are looking for the same sort of output as input.

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 'MOCS13;MTCIN13;MTCIN14;100IN14;111IN14;123IN14' as list from dual union all
      2             select 'BOB13;MTCIN23;123IN14' from dual union all
      3             select 'MTCIN11;123IN14;MTC123X' from dual
      4            )
      5      ,t2 as (select list, row_number() over (partition by list order by 1) as pos
      6              from t, (select rownum from dual connect by rownum <= 100)) -- assumes never more than 100 entries in list
      7  select list, ltrim(sys_connect_by_path(mtcs,';'),';') as mtcs
      8  from (
      9    select list, ltrim(REGEXP_SUBSTR(';'||list,';[[:alnum:]]*',1,pos),';') as MTCs, row_number() over (partition by list order by 1) rn
     10    from t2
     11    where ltrim(REGEXP_SUBSTR(';'||list,';[[:alnum:]]*',1,pos),';') like 'MTC%'
     12    )
     13  where connect_by_isleaf = 1
     14  connect by list = prior list and rn = prior rn+1
     15* start with rn = 1
    SQL> /
    
    LIST                                           MTCS
    ---------------------------------------------- ------------------------------
    BOB13;MTCIN23;123IN14                          MTCIN23
    MOCS13;MTCIN13;MTCIN14;100IN14;111IN14;123IN14 MTCIN13;MTCIN14
    MTCIN11;123IN14;MTC123X                        MTCIN11;MTC123X
    
    SQL>
    
  • "BOLD" of blackBerry Smartphone + microsdhc 16 GB = does not read! Help!

    I bought 16 gb microsdhc SanDisk. When I load approximately 10-15 songs and 100 images... my phone readings, exhibitions and playing of images and music files.  But when I do a complete transfer of all photos 7gbs, my phone is not read or display images. I thought that the card I bought was false, so I went to a Best Buy local and bought the same exact card and the same problem happened.

    Is there something I need to change in the configuration of my phone? Or is it a matter of bring to the AT & T store?

    Fixed a problem!

    I guess that the phone reads only certain amount of data to each analysis.

    that took me almost 12 GB in a 16 GB at the same time, the phone will not read it all at once.

    So I Atl + right shift + delete to a soft start to the phone... and it loads the rest of the data.

  • BPEL does not receive "return value" of MS SQL, stored procedure

    Hello

    We are facing this problem citing a MS SQL stored procedure the BPEL (jdbc 1.2 driver). We have created the wsdl for the stored procedure correctly using a command line utility tool provided with Oracle SOA Suite.
    But the question is THAT BPEL is not able to get the data present in the statement of "return" of the procedure. We receive null output. But it is able to extract the data from the output variable, if any. Case 1 below is for the return statement. Case 2 is for the output variable


    Case 1: in the following, the output is returned using the return statement. The BPEL that calls this procedure is to obtain a NULL value as an answer to this.


    ALTER PROCEDURE [dbo]. [AddNumbersRet]
    -Add the parameters for the procedure
    @Number1 int,
    @Number2 int
    AS
    BEGIN
    -SET NOCOUNT ON added to avoid additional results sets from
    -interfering with SELECT statements.
    SET NOCOUNT ON;

    -Controls insert for procedure here
    Return (@Number1 + @Number2);
    END

    Case 2: in the following, the output is returned using the SumOfNums output variable. The BPEL that calls this procedure is to obtain a correct answer.


    ALTER PROCEDURE [dbo]. [AddNumbers]
    @Number1 int,
    @Number2 int,
    @SumOfNums int output
    AS
    BEGIN

    -SET NOCOUNT ON added to avoid additional results sets from
    -interfering with SELECT statements.
    SET NOCOUNT ON;

    Set @SumOfNums = (@Number1 + @Number2);

    END



    Case 1 is a failure and case 2 is successful. We cannot change our procedures similar to case 1 to use variables of output because of dependencies on other applications.

    All the world is facing this problem? This looks like a bug in BPEL. Please, share your experiences.


    Thanks and greetings

    Mohan

    Published by: user10980910 on December 8, 2009 05:16

    There is a gap in the command line utility that was addressed in the adapter configuration (AS11gR1) Wizard. The API is a procedure, not a function, so does not return the query for the parameters that the utility made anything for the RETURN statement.

    The adapter configuration wizard is unable to say if there is a RETURN statement either, but it provides the user with a check box that can be used to indicate the presence of the declaration. In the wizard, if you check the checkbox, a parameter is added to the XSD to the RETURN statement. In essence, the adapter will process the procedure as a function and you will get the value of the PERFORMANCE.

    Usually, I wish to indicate that you certainly should NOT change the generated XSD. But you might be able to do it, by adding the necessary element to the OutputParameters for your RETURN statement. Add the following immediately AFTER the element of 'Lines', which occurs first in the XSD and BEFORE all items for the other none.

    Use a value for the "" that is meaningful to you. The wizard uses the name of the stored procedure with the name of the element. We could call this "RETURN_VALUE" or else if is more to your liking. Add the item after you generate the XSD using the command line utility, and then use the XSD when you model your BPEL processes. The WSDL should already have the content for this element handling.

  • CD rw-cd rom drive... not reading all discs.

    OK, so I bought a studio of dell in January. 2009... it came with a regular training who rewrote the CD and reads the DVD.  and a blue ray player.  My Blue Ray works for everything, including burning cds\dvds.  the standard drive reads cds and dvds but not CDs software, also would not read any kind of cd serious if it had music, photos, video, or software. After one of three days he would have completely read only new music CD. I didn't care to send the com for a new cdrom drive and they would eventually wipe my drive which I had installed new programs. which allow only install once. so I stopped completely to help this drive after unsuccessfully for the dell Diagnostics Web page. now im wondering if I should just replace the drive of CD-ROM. my com. said very well his work through all the tests of systems etc... Thank you

    Hello

    1. are you able to use these discs without any problem on the other computer?

    2 have. what troubleshooting steps you tried?

    I suggest you try the procedure below.

    Step 1: If you have not tried runningAutomated Troubleshooting Services, then, please try it.

    Reference:http://support.microsoft.com/gp/hardware_device_problems

    Step 2: Remove upper and lower filters.

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 how to back up and restore the registry in Windows

    To resolve this problem, remove the affected filter drivers. To do this, follow these steps:

    a. click onstart toreduce this includes this image, typeregedit in the Search box, and then clickregedit in the list ofprograms .

    Collapse this includes this imageIf you are prompted for an administrator password or a confirmation, type your password or clickcontinue.

    b. look for, and then click the following registry subkey:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ {4D36E965-E325-11CE-BFC1-08002BE10318}

    Warning There may be many instances of the registry subkey that is mentioned in step 2. You must ensure that you are in the appropriate registry subkey before modifying the UpperFilters and LowerFilters values. To verify that you are in the appropriate registry subkey, make sure that the default data value is the CD-ROM/DVD-ROM and the class data value is CDROM.

    c. in the pane, clickUpperFiltersand then clickRemove.

    d. click onYes to confirm the deletion of the UpperFilters registry entry.

    e. in the pane, clickLowerFilters, and then clickRemove.

    f. clickYes to confirm the deletion of the LowerFilters registry entry.

    g. out of the Publisher of the registry, and then restart the computer.

    Note After the removal of the UpperFilters registry entry and the LowerFilters registry entry, you may lose functionality in certain programs such as CD recording programs. In this scenario, you must reinstall all of the programs involved. If the problem persists, contact the program vendor to determine if an update is available for the program.

    Step 4: Update the driver.

    Steps to update the driver:

    a. Click Start, typedevmgmt.msc and press to enter.

    b. expand the CD/DVD and right click on the sub element and click onUpdate driver.

    If that fails, then try to reinstall the CD/DVD driver

    i. click onStart, type devmgmt.msc and then on enter.

    II. expand driver CD/DVD and do a right-click on the sub item and clickUninstall.

    III. to restart the computer.

    IV. visit the manufacturer's Web site to download the latest version of the driver.

    v. install the driver, and then restart the computer so that the changes take effect.

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    http://Windows.Microsoft.com/en-us/Windows7/update-drivers-recommended-links

    Also have a look at the article below.

    http://support.Dell.com/support/topics/global.aspx/support/DSN/document?c=us&l=en&s=Gen&docid=346785

    Important note: This response contains a reference to third party World Wide Web site. Microsoft provides this information as a convenience to you. Microsoft does not control these sites and no has not tested any software or information found on these sites; Therefore, Microsoft cannot make any approach to quality, security or the ability of a software or information that are there. There are the dangers inherent in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    The CD drive or the DVD drive does not work as expected on a computer that you upgraded to Windows Vista

    http://support.Microsoft.com/kb/929461

    When you insert a CD or a DVD, Windows Vista may not recognize the disc
    http://support.Microsoft.com/kb/939052

    CD/DVD drive does not appear in Windows Vista, or you receive this error during the installation of Windows Vista after booting from the DVD
    http://support.Microsoft.com/kb/952951

    Thanks and greetings
    Umesh P - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • Guest user does not return a value

    I have a user prompt dialog box which is a slightly modified version of questioning the standard user to enter VI express. I tried to change the VI so that it would allow the user to close the command prompt by pressing the enter/return key. The final objective is to have the popup dialog, the user will scan a bar code and barcode reader adds a carriage return, automatic closing of the dialog box character.

    I have followed this user lyrics: https://decibel.ni.com/content/docs/DOC-13973. The only difference between my code and the code it is that my user dialog box returns a string instead of a number. See below for my code.

    The problem that I am running is the string "Item number2" never really returns any value once it's called. The indicator on the front panel of the updated the express vi displays the correct value after you run, but the value is never returned to the VI, who called the dialog box. The express vi the value default value is successfully returned. The only change I made was the addition of the structure of the event, so I have to assume that my code does not go inside this node.

    Any thoughts are appreciated.

    Adjust the chain drive on 'Update value then of the hit'.

  • Tag value does not go through all the elements of backup

    Environment:

    Oracle 11.2.0.3 EE on Solaris 10.5

    When performing a backup incremental level 0 and by specifying the value of tag on the command line in the RMAN script, it appears the tag value is not used on all aspects of backup.

    It looks fine when you save the archive logs, but when he switches to the database files, it returns to the default format of Oracle.

    This isn't a question, but I was just curious to know what would cause this and how to fix it.

    The backup is performed via a "cron" job that runs RMAN and refers to a RMAN script on the RMAN invocation command line. If its:
    RMAN target / @rman_incr_0_backup.rman
    Here is the output of the log file and I'll try to highlight where tag values are:
    RMAN> backup incremental level 0 cumulative database plus archivelog tag 'full_daily';
    2> DELETE NOPROMPT OBSOLETE;
    3>
    
    Starting backup at 2012-05-16:03:05:02
    current log archived
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=99 device type=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: SID=341 device type=DISK
    allocated channel: ORA_DISK_3
    channel ORA_DISK_3: SID=1203 device type=DISK
    skipping archived logs of thread 1 from sequence 1132 to 1199; already backed up
    skipping archived logs of thread 1 from sequence 1249 to 1283; already backed up
    channel ORA_DISK_1: starting compressed archived log backup set
    channel ORA_DISK_1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=1284 RECID=1275 STAMP=783397502
    channel ORA_DISK_1: starting piece 1 at 2012-05-16:03:05:04
    channel ORA_DISK_2: starting compressed archived log backup set
    channel ORA_DISK_2: specifying archived log(s) in backup set
    input archived log thread=1 sequence=1285 RECID=1276 STAMP=783399902
    channel ORA_DISK_2: starting piece 1 at 2012-05-16:03:05:04
    channel ORA_DISK_2: finished piece 1 at 2012-05-16:03:05:05
    piece handle=/rman/APSMDMP2/APSMDMP2_20120516_783399904_1656_1 tag=FULL_DAILY comment=NONE   <-- TAG value is OK
    channel ORA_DISK_2: backup set complete, elapsed time: 00:00:01
    channel ORA_DISK_1: finished piece 1 at 2012-05-16:03:05:11
    piece handle=/rman/APSMDMP2/APSMDMP2_20120516_783399904_1655_1 tag=FULL_DAILY comment=NONE   <--  TAG value is OK
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
    Finished backup at 2012-05-16:03:05:11
    
    Starting backup at 2012-05-16:03:05:11
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    channel ORA_DISK_1: starting compressed incremental level 0 datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00017 name=/u04/oradata/APSMDMP2/tecospai_base_indx_01.dbf
    input datafile file number=00005 name=/u03/oradata/APSMDMP2/data_process_dt01_01.dbf
    input datafile file number=00021 name=/u04/oradata/APSMDMP2/tecospai_hstry_indx_01.dbf
    channel ORA_DISK_1: starting piece 1 at 2012-05-16:03:05:12
    channel ORA_DISK_2: starting compressed incremental level 0 datafile backup set
    channel ORA_DISK_2: specifying datafile(s) in backup set
    input datafile file number=00016 name=/u04/oradata/APSMDMP2/tecospai_base_data_01.dbf
    input datafile file number=00003 name=/u02/oradata/APSMDMP2/undotbs01.dbf
    input datafile file number=00011 name=/u02/oradata/APSMDMP2/mdm_data_dt01_01.dbf
    channel ORA_DISK_2: starting piece 1 at 2012-05-16:03:05:12
    channel ORA_DISK_3: starting compressed incremental level 0 datafile backup set
    channel ORA_DISK_3: specifying datafile(s) in backup set
    input datafile file number=00024 name=/u04/oradata/APSMDMP2/tecospai_rpt_data_01.dbf
    channel ORA_DISK_3: starting piece 1 at 2012-05-16:03:05:12
    channel ORA_DISK_3: finished piece 1 at 2012-05-16:03:07:27
    piece handle=/rman/APSMDMP2/APSMDMP2_20120516_783399912_1659_1 tag=TAG20120516T030511 comment=NONE   <-- TAG value has reverted to default
    channel ORA_DISK_3: backup set complete, elapsed time: 00:02:15
    channel ORA_DISK_3: starting compressed incremental level 0 datafile backup set
    channel ORA_DISK_3: specifying datafile(s) in backup set
    input datafile file number=00025 name=/u04/oradata/APSMDMP2/tecospai_rpt_indx_01.dbf
    channel ORA_DISK_3: starting piece 1 at 2012-05-16:03:07:27
    channel ORA_DISK_3: finished piece 1 at 2012-05-16:03:07:28
    piece handle=/rman/APSMDMP2/APSMDMP2_20120516_783400047_1660_1 tag=TAG20120516T030511 comment=NONE   <-- TAG value still the default
    channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
    channel ORA_DISK_3: starting compressed incremental level 0 datafile backup set
    channel ORA_DISK_3: specifying datafile(s) in backup set
    input datafile file number=00014 name=/u04/oradata/APSMDMP2/tecospai_audit_data_01.dbf
    input datafile file number=00023 name=/u04/oradata/APSMDMP2/tecospai_ref_indx_01.dbf
    input datafile file number=00022 name=/u04/oradata/APSMDMP2/tecospai_ref_data_01.dbf
    channel ORA_DISK_3: starting piece 1 at 2012-05-16:03:07:28
    channel ORA_DISK_3: finished piece 1 at 2012-05-16:03:07:53
    piece handle=/rman/APSMDMP2/APSMDMP2_20120516_783400048_1661_1 tag=TAG20120516T030511 comment=NONE   <-- TAG value still the default
    channel ORA_DISK_3: backup set complete, elapsed time: 00:00:25
    .
    .
    .
    Thank you very much for your comments!

    -gary

    The tag name, which you mentioned in your order only goes for the Archivelogs backup and not backup of the data file.

    database cumulative backup incremental level 0 more archivelog tag "full_daily".

    You can try it as:

    RMAN > backup effective cumulative database tag additional 0 ' more archivelog tag "".

  • M30x-118 DVD not read and write all formats

    Having problem with m30x-118 (Mat * a uj-820 s). It is not reading the cd - r/rw and DVD + r/rw but read commercial perfectly all cd/dvd - like video dvd or toshiba installation cd.
    While trying to open the disc - "d:\ is not accessible incorrect function" appears.
    Nero recognizes empty disk inserted, but having power calibration error.

    Ramasst running, driver dvd reinstall does not help.

    Hello

    The "power calibration error" message is a problem that occurs with the more recent writers as older. These means of error message that the CD/DVD writer cannot write in the blank CD/DVD because it can t match the output power of the laser power to write CD/DVD.

    Please check this page useful:
    http://www.electricattic.NET/en/mediumspeederror.htm
    http://www.dvdplusvideo.com/dvdguide001.html

    You will find an advice and information why these problems occur.

Maybe you are looking for

  • Windows 10 not settle on Satellite P850 - 31L

    Toshiba satalite P850 - 31L will not be updated to windows 10, I've updated to not win 8.1 clean install No 10 windowns Update icon in the status bar and I also tried iso it says that the code is wrong? any help please

  • Qosmio F30-140: No Tuner TV with Windows XP Professional

    Hello I have a Qosmio F30-140 unpacking for computer laptop, I bought a Windows Xp professional, but unfortunately I can't see a TV Tuner and I do not know how to handle this problem? And the second thing I have a problem with Qosmio player too.It's

  • How do I move the control of hypertrend OR the façade of Labview

    Hello world Please, I would like to know if the control hypertrend OR the palette of the DSC can be move in the whole of the façade and how. Once I put this control on the front panel, it just stays where I put and not allow me to move it. I'd apprec

  • Error: [810215] MakeDecision method is disabled and cannot be called.

    Hello! Odd error here: I am trying to call a method named "MakeDecision" in the Web Designer PersonWantsOrg cutomizer. For a few hours, I get the message "error: [810215] MakeDecision method is disabled and cannot be called. '. I can't explain it to

  • Simulate the GPS and the accelerometer?

    Don't/does the Simulator to simulate coordinates GPS (direction, speed, etc.) and the accelerometer?  I know that VMWare will be not able to do it, but another method?  Yet another application in developer mode that can run a script to simulate some