Function to hide the CLOB records

Hi guys,.

We wrote a function Oracle in 9i to hide numbers of PAN in CLOB as below:


FUNCTION to CREATE or REPLACE pci_pnrod.cf_pan_identify (i_clob CLOB)
RETURN THE CLOB
IS
v_charpos PLS_INTEGER: = 0;
v_charpos_init PLS_INTEGER: = 0;
v_charpos_max_inner PLS_INTEGER: = 0;
v_pan_length PLS_INTEGER: = 0;
v_pan_length_inner PLS_INTEGER: = 0;
v_charpos_max PLS_INTEGER: = 0;
v_outclob CLOB.
v_inlen PLS_INTEGER: = DBMS_LOB.getlength (i_clob);
v_isvalid PLS_INTEGER: = 0;
v_pan NVARCHAR2 (100): = ' ';
v_pan_in NVARCHAR2 (100): = '0';
v_pan_out NVARCHAR2 (100): = '0';
v_bin PLS_INTEGER: = 0;
v_add PLS_INTEGER: = 0;
v_chksum PLS_INTEGER: = 0;
v_innerposition PLS_INTEGER: = 0;
v_special_char VARCHAR2 (1);
v_proclob CLOB.
CLOB v_proclob1;
v_obfuscate_count PLS_INTEGER: = 0;
v_procount PLS_INTEGER: = 0;
v_pspecial_char VARCHAR2 (1);
v_pcharpos_init PLS_INTEGER: = 0;
v_ploop PLS_INTEGER: = 0;
v_char VARCHAR2 (1);
v_plen PLS_INTEGER: = 0;
v_count INTEGER: = 0;

CURSOR bin_ex
IS
SELECT bin_range
OF pci_pnrod_pan_exclusion;
BEGIN
v_outclob: = i_clob;

All IN v_charpos_init < = v_inlen
LOOP
v_charpos_init: =.
LESS
(CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 0', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 0', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE


WHEN DBMS_LOB. INSTR (v_outclob, '1', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, '1', v_charpos_init + 1)
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 2', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 2', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 3', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 3', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 4', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 4', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 5', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 5', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 6', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 6', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 7', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 7', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, ' 8', v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, ' 8', v_charpos_init + 1).
ANOTHER v_inlen + 1
END,
CASE
WHEN DBMS_LOB. INSTR (v_outclob, "9", v_charpos_init + 1) > 0
THEN DBMS_LOB. INSTR (v_outclob, "9", v_charpos_init + 1).
ANOTHER v_inlen + 1
END
);

IF (v_pspecial_char <>v_special_char AND v_pspecial_char IS NOT NULL)
THEN
Dbms_output.put_line (' Jai Ho ');
v_charpos: = v_pcharpos_init;
v_charpos_max: = 1;
END IF;

IF (v_special_char IS NULL)
THEN
v_charpos: = v_charpos_init;
v_charpos_max: = 1;
END IF;

v_pspecial_char: = v_special_char;
v_proclob1: =.
DBMS_LOB. SUBSTR (v_outclob, v_inlen - v_charpos + 1, v_charpos);
v_plen: = DBMS_LOB.getlength (v_proclob1);

IF (v_special_char = '_')
THEN
v_ploop: = 0;
v_proclob: = NULL;

WHILE (v_ploop < = v_plen)
LOOP
v_ploop: = v_ploop + 1;
v_char: = DBMS_LOB. SUBSTR (v_proclob1, 1, v_ploop);

IF (v_char = '_')
THEN
v_proclob: = v_proclob | '0' ;
ON THE OTHER
v_proclob: = v_proclob | v_char;
END IF;
END LOOP;
ON THE OTHER
v_proclob: = REPLACE (v_proclob1, v_special_char, 0);
END IF;

WHILE THAT ((TRANSLATE (DBMS_LOB. SUBSTR (v_proclob, 1, v_charpos_max).
"0123456789"
'@@@@@@@@@@'
) = '@'
)
)
LOOP
v_charpos_max: = v_charpos_max + 1;
END LOOP;

v_charpos_max: = v_charpos_max - 1;
Dbms_output.put_line ('v_Special_Char_I: ' | v_special_char);
Dbms_output.put_line ('v_PSpecial_Char_I: ' | v_pspecial_char);
Dbms_output.put_line ('v_charpos_init: ' | v_charpos_init);
Dbms_output.put_line ('v_charpos: ' | v_charpos);
Dbms_output.put_line ('v_charpos_max: ' | v_charpos_max);
-dbms_output.put_line ('v_ProClob1: ' | v_ProClob1);
v_pan: = DBMS_LOB. SUBSTR (v_proclob1, v_charpos_max, 1);
v_pan: = REPLACE (v_pan, v_special_char, ");
v_pan_length: = DBMS_LOB.getlength (v_pan);
v_pan_length_inner: = v_pan_length;
Dbms_output.put_line ('v_PAN: ' | v_pan);
--##########################################

IF (SUBSTR (v_pan, 7, v_pan_length - 10) <>0)
THEN
v_bin: = NULL;

FOR bin IN bin_ex
LOOP
IF (SUBSTR (v_pan, 1, 2) = bin.bin_range)
THEN
v_bin: = 2;
END IF;
END LOOP;

IF (v_bin IS NULL)
THEN
FOR bin IN bin_ex
LOOP
IF (SUBSTR (v_pan, 1, 1) = bin.bin_range)
THEN
v_bin: = 2;
END IF;
END LOOP;
END IF;

IF (NVL (v_bin, 0) NOT IN (1 2)),
AND (v_pan_length > = 13 AND v_pan_length < = 19)
)
THEN
v_special_char: = NULL;

IF (MOD (v_pan_length_inner, 2) = 0)
THEN
WHILE (v_pan_length_inner > 0)
LOOP
IF (MOD (v_pan_length_inner, 2) = 0)
THEN
v_add: = SUBSTR (v_pan, v_pan_length_inner, 1);
v_innerposition: = LENGTH (v_add);
ON THE OTHER
v_add: = 2 * SUBSTR (v_pan, v_pan_length_inner, 1);
v_innerposition: = LENGTH (v_add);
END IF;

WHILE (v_innerposition > 0)
LOOP
v_chksum: =.
v_chksum + SUBSTR (v_add, v_innerposition, 1);
v_innerposition: = v_innerposition - 1;
END LOOP;

v_pan_length_inner: = v_pan_length_inner - 1;
END LOOP;
ELSIF (MOD (v_pan_length_inner, 2)! = 0)
THEN
WHILE (v_pan_length_inner > 0)
LOOP
IF (MOD (v_pan_length_inner, 2)! = 0)
THEN
v_add: = SUBSTR (v_pan, v_pan_length_inner, 1);
v_innerposition: = LENGTH (v_add);
ON THE OTHER
v_add: = 2 * SUBSTR (v_pan, v_pan_length_inner, 1);
v_innerposition: = LENGTH (v_add);
END IF;

WHILE (v_innerposition > 0)
LOOP
v_chksum: =.
v_chksum + SUBSTR (v_add, v_innerposition, 1);
v_innerposition: = v_innerposition - 1;
END LOOP;

v_pan_length_inner: = v_pan_length_inner - 1;
END LOOP;
END IF;

IF (MOD (v_chksum, 10) = 0)
THEN
v_isvalid: = 1;
ELSIF (MOD (v_chksum, 10)! = 0)
THEN
v_isvalid: = 2;
END IF;

IF (v_isvalid = 1)
THEN
v_isvalid: = 0;
v_obfuscate_count: = 0;
v_procount: = 0;
v_count: = v_count + 1;

WHILE (v_obfuscate_count < v_charpos_max)
LOOP
IF (DBMS_LOB. SUBSTR (v_outclob,
1,
v_charpos + v_obfuscate_count
) = SUBSTR (v_pan, v_procount + 1, 1)
)
THEN
v_obfuscate_count: = v_obfuscate_count + 1;
v_procount: = v_procount + 1;

IF (v_procount > 6 AND v_procount < (v_pan_length - 3))
)
THEN
v_outclob: =.
DBMS_LOB. SUBSTR (v_outclob,
v_charpos + v_obfuscate_count
-2,
1
)
|| '0'
|| DBMS_LOB. SUBSTR (v_outclob,
v_inlen
-(v_charpos
+ v_obfuscate_count
),
v_charpos + v_obfuscate_count
);
END IF;
ON THE OTHER
v_obfuscate_count: = v_obfuscate_count + 1;
END IF;
END LOOP;
END IF;
ELSIF (v_pan_length < 13 GOLD v_isvalid = 2)
THEN
v_special_char: =.
DBMS_LOB. SUBSTR (v_outclob, 1, v_charpos + v_charpos_max);

IF (v_special_char = '.')
OR v_special_char = ' / '.
OR v_special_char = '-'
OR v_special_char = ' '
OR v_special_char = "_".
)
THEN
IF (TRANSLATE (DBMS_LOB. SUBSTR (v_outclob,
1,
v_charpos + v_charpos_max + 1
),
"0123456789"
'@@@@@@@@@@'
) = '@'
)
THEN
v_special_char: = v_special_char;
ON THE OTHER
v_special_char: = NULL;
END IF;
ON THE OTHER
v_special_char: = NULL;
END IF;
ON THE OTHER
v_special_char: = NULL;
END IF;
END IF;

v_pcharpos_init: = v_charpos_init;

IF (v_charpos_max = - 1)
THEN
v_charpos_init: = v_charpos_init + 1;
ON THE OTHER
v_charpos_init: = v_charpos + v_charpos_max;
END IF;

Dbms_output.put_line ('v_Special_Char_D: ' | v_special_char);
Dbms_output.put_line ('v_PSpecial_Char_D: ' | v_pspecial_char);
-dbms_output.put_line ('V_Outclob: ' |) V_Outclob);
END LOOP;

V_count BACK | '~' || v_outclob;
END;
/

When we give below to enter the function, it will somehow in infinite loop.

< PNR > < PNR_Body > DV9JVG - ETKT-* FQ

RCVD - MS NILAY NAGLE

NET GS DON'T 04SEP1652Z VS B1CC31

1.1NAGLE / NILAYMS

2 VS 22 X 12 SU IADLHR HK1 SEP 1840. 0705.

FONE-

1.LON4402073815463 * GB / EH

2.LON4407792897827 * GO MOBILE/B

3.EML* [email protected]/N

PRICE QUOTE-AUTO - $-$-PPFM¥@@PTC¥. LHR/LHR

1 PSGR 1 PFM

GBP154.00 YQ111.00 GB45.00 XT59.57 TTL369.57

PRICE TOTAL - GBP369.57

TKT-T/FQR/4539680063548105/21587832295/0001//369.57

FAX FROM GEN - * ATK/SSR TO NBRS TKT

1.SSRFQTRVSHK/VS00500500500-NAGLE/NILAYMS¥01.01

Please can someone be able to help me in this.

See you soon,.

Shax

Tubby wrote:

Think you missed the code slightly above the LOOP.

Thank you - hey, welcome back to your apparent "extended" holiday also.

I were not, in and of itself, but I have of course no ' get all these loops of LOOP/END-matched.

I can't of course follow that OP is this: no comments at all, no formatting, no clue.

OP has this early in the main LOOP:

Everything v_charpos_init<=>

LOOP

And then it's the end of the main LOOP:

IF (v_charpos_max = - 1)

THEN

v_charpos_init: = v_charpos_init + 1;

ON THE OTHER

v_charpos_init: = v_charpos + v_charpos_max;

END IF;

So if the IF condition is NOT satisfied then the award of 'v_charpos_int' will have a '-1 inside. I were not able to understand everything that happens (or is supposed to happen) to "v_charpos" but if the loop iterator gets decremented and is used in this "less than or equal to" test which is certainly a candidate to stay in the loop.

Tags: Database

Similar Questions

  • Flash questions CC 2014 with the function to hide the edges and much more

    It seems that in each new version of Flash rather than fix the old Adobe bugs only adds new...

    I just moved from the 6 CC 2014 CS and now when I want to use the function to hide the edges (which they "kindly" changed the shortcut to) once I do a little change, say, the color of the shape or line that I recover the selection, even if the menu "hide edges" is always marked.

    The touch line, I can't use this feature, it is useless, and now it's really hard to choose the right colors for my work.

    I searched the net, has not found on it, does anyone else have this problem? Does anyone have a solution?

    Another bug is when I have a layer selected and then I lock it, the selection remains, and the only way to clear this refresh bug is to hide the layer and show it again...

    New - anyone have this problem? or has a solution?

    So much refresh / focus bugs that move from one version to the other, I do not understand why adobe is not their fixation. Makes me think to return to an old license and to stop paying so much money for a full old bugs of adobe software.

    Hello

    The problem with the feature to hide the edges is fixed and will be available in the next version. I could see the screen refresh problem with layer of lock after you raw forms of copy/cut paste. We will take a peek.

    Thank you!

    Mohan

  • Disable / hide the "Historical Record" Option for the end user

    Dear people,

    Is it possible to 'Turn OFF' / 'HIDE' option "Historical Record" form according to the level of responsibility/user/site.

    All form = Help Menu = historical Record (Option)

    Or is there an option to HIDE Menu "help" for all users or user or site level or level of responsibility?

    Thank you.

    Configuration:
    R12: 12.0.4
    DB: 10.2.0.3
    Multi node

    Kind regards
    Taj

    Hi Mohammed,.

    In my view, there is no option of profile to hide the "Historical Record". This can be achieved through CUSTOM.pll (using "SET_MENU_ITEM_PROPERTY").

    See the following document for an example on how to hide from the CUSTOM CODE in the Help menu.

    Note: 1068804.6 - How to hide the "CUSTOM CODE" Option in the menu of the USER GUI
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=1068804.6

    Note: 1005502.6 - HOW to REMOVE THE MENU 'WINDOW' Oracle FORMS MENU CUSTOM?
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=1005502.6

    Note: 744065.1 - Sample Code to customize Applications CUSTOM library
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=744065.1

    Kind regards
    Hussein

  • SQL with APEX_ITEM.textarea for the display of the CLOB

    Hi all

    I need help here. I just changed my Varchar2 to the CLOB data type and now my region to report that uses APEX_ITEM.textarea to display CLOB data is broken.
    I found a thread saying to use wwv_flow_utilities.clob_to_varchar2 as follows
    SELECT A.REVIEW_ID, apex_item.textarea(1,wwv_flow_utilities.clob_to_varchar2(A.COMMENTS),200) comments
    FROM SKILLSET_REVIEW A
    where review_id = 200905000198
    It gives me this error.

    ORA-06502: PL/SQL: digital or value error: character string buffer too small

    can anyone help?
    I hope to display the entire contents of the CLOB.

    Hi, Joel,

    I had the same problem and here is the solution I found. You can really limit the size of the values of columns returned in the SQL queries to 4000, but if you use this text box to change the value of the column, you must show all of the text. There is no such limit if you use CLOB in SQL. So if you do the apex_item.textarea function to return the CLOB instead of varchar2 (32767), you will then be able to call from SQL. I created a stored PL/SQL function that takes as argument the CLOB value column, then calls apex_item.textarea, converts the returned CLOB value and returns this CLOB, it looks like this:

    function apex_item_textarea_clob (p_column_value in clob,
    number of p_textarea_rows
    number of p_textarea_cols)

    CLOB is back
    CLOB v_str;
    Start
    v_str: = to_clob (apex_item.textarea (1)
    wwv_flow_utilities.clob_to_varchar2 (p_column_value),
    p_textarea_rows,
    p_textarea_cols));
    Return v_str;
    end;

    Then, in the SQL query, I call this function (e.g. apex_item_textarea_clob(1,A.COMMENTS,4,60) ) instead of apex_item.textarea(18,A.COMMENTS,4,60). And another thing, you can use apex_application.g_f1 (i) in the process of PL/SQL page as when using apex_item.textarea. In this way, you can view and change values up to 32767, because the apex_item.textarea argument type is varchar2, but it's better than 4000. It works fine for me.

    Mimi

  • 38.0.1 is useless for me without a function to hide. And why not on the option?

    no need

    Johnalaska said

    I'm sorry, I'm new and thought since it was a forum for Thunderbird that refer to v38.0.1 and no function to hide [normally under the icon drop-down TB] would be obvious.

    But I'm wrong.

    Here is a screenshot of TB menu icon dropdown with only Quit showing.

    Sorry, I don't have a Mac. Someone else who should be able to answer your question.

  • Is it possible to hide the icon from the application of the function application switcher?

    I scored my application in the module system and able to hide the icon is created.  The application starts automatically in the background when the device is started.  The only problem that I face, is that the user is able to see the application icon in the app selector.  Is it possible to hide it from there?

    In your class, which replace the UiApplication, override the acceptsForeground() function:

    // This keeps the background instance from showing up on the ribbon.
    protected boolean acceptsForeground() {
        return false;
    }
    
  • My only intention is to create a model/site based URM where we can provide functionality to scan for users. We want a distributed feature where users can scan the images remotely and commit to the WCC:Records / URM. Is it possible to be thr

    My only intention is to create a model/site based URM where we can provide functionality to scan for users. We want a distributed feature where users can scan the images remotely and commit to the WCC:Records / URM.

    Is it possible to be done through Oracle distributed Document capture (ODDC) and if it is possible how to connect ODDC with the client browser. Please suggest

    Ok. So, the answer is certainly: Yes, it is possible.

    The part of analysis, this is exactly what ODDC is good for. Unless you have the license already, however, you may have to go with the product to Capture Oracle WebCenter (large companies), which provides the necessary also.

    Regarding the validation and storage, ODDC/ODC/WebCenter Capture can commit images scanned at several depots, including University Complutense of MADRID (URM can be considered a Complutense University of MADRID with a specific purpose / several modules or components under voltage and configured). So, technically, he has no problem.

    When I have little doubt, however, is the meaning of the scenario - declaring an item as a record is an important event in the life cycle of the document - a record is often (or always) cannot be changed to ensure the integrity and non-repudiation of information. In this perspective, a direct validation of a recording of a scanning system (where errors such as bad scans, lack of pages, etc can be expected, particularly if the scanning is performed by the end user in a distributed fashion - so, not very experienced) seems a little dangerous.

  • Hide the header and show the child lines in the record of decision

    Hello

    I have this requirement, where I need show only the child report of lines and hide the out line of position. Is this possible?

    For example. The report from now looks to below: -.


    I want to make my report decision to look like below without the line " " The ABC test form is "

    Kind regards

    Suan

    If you set the attribute 'the ABC test form is pass' silent that it will not be displayed in the record of decision, but its subitems will be.

    1. Make sure that the attribute "the ABC test form is pass" is a properties file
    2. Double-click it in the file properties, and then select the record of decision.
    3. Check if Invisible: 'True' option.

    See "Hide in a record of decision information" in Oracle user modeling Strategy Guide

  • Anyway to hide the functionality of booking on the modules of the event?

    Hello

    I'm just curious to know if there was a way to hide the feature of capacity for events on a site I'm trying. There is no reservation required for all events on this site, so I was hoping there was a way to hide this line? I have attached an image below for reference. Any help would be greatly appreciated. Thank you.

    Jordan

    Picture 2.png

    Hi Jordan,.

    Go to Admin > Site Manager > models Module > event Layouts > detail the layout and to remove "capacity: {tag_capacity} (reserved (e) {tag_percentfull})" "

    Kind regards

    Alex

  • 10g - hide, the report contains the oracle user-defined function

    Hi, experts,

    of http://obiee101.blogspot.com/2008/07/obiee-cache-management.html

    Reasons why a request is not added to the Cache:



    •The-cacheable SQL element. If a SQL query contains Current_Timestamp, Current_Time, Rand, Populate, or a parameter marker, then it is not added to the cache.

    •The-cacheable table. Physical in the Oracle BI Server repository tables can be marked "cacheable". If a query refers to any non-cacheable table then the results of the query will not be added to the cache.

    •Cache hit. In general, if the query gets a cache hit on a previously cached query, then the results of the current query are not added to the cache. The exception is query that is aggregated at winding hits hits.

    Result set is too large.
    Query is canceled. This can happen by explicit cancellation of Oracle BI Presentation Services or Administration, or implicitly through timeout tool.

    •Oracle BI Server is clustered. Queries coming into family "seeding cache" spread in the whole of the cluster. Other queries continue to be stored locally. Therefore, even if a query may be cached on the Server BI Oracle 1 node, it can not be on the node Server BI Oracle 2.




    I would like to know
    If the application (report on the dashboard) calls a function defined by the user to oracle, the cache can be created and saved for this report?

    Thank you very much!

    Hello stephen,.

    If the application (report on the dashboard) calls a function defined by the user to oracle, the cache can be created and saved for this report?

    Yes, it is cached... function defined in the database is called OBIEE is cached and saved.

    More information and example can be found here http://oraclebizint.wordpress.com/2007/09/10/oracle-bi-ee-10133-support-for-native-database-functions-and-aggregates/

    Hope this helps you. Check answers to any other questions you have posted?

    By,.
    KK

  • One button - show and hide the function

    Hi I want to use it to be able to click the button once to show a subfield and click again to hide

    I hide the code to the click event and click to show works of stage, but the second click does nothing

    my code is:

    If (help1vidlist.presence = "hidden") {}

    help1vidlist. Presence = "visible";

    } else if (help1vidlist.presence = 'visible') {}

    help1vidlist. Presence = "hidden";

    }

    any ideas?

    Thank you

    I think that you should use the operator 'is' under the conditions, it is;

    If (help1vidlist.presence == 'hidden') {}

    help1vidlist. Presence = "visible";

    } Else if (help1vidlist.presence == 'visible') {}

    help1vidlist. Presence = "hidden";

    }

    Concerning

    Bruce

  • PHP (go to the next record in the database)?

    Is there a php function that will move to the next record in a database and return to the page so that it looks out of date?

    Here is my senario.

    I have 30 events in a database from January 10, 2012, through to December 20, 2012, listed by date of-10-01-2012, 2012-12-20 etc.

    On the homepage of Web sites, I want to list the 3 dates "next". Obviously January 10 has expired but is still listed in the database. The simplest would be to delete the record from the database, I suppose, but I was wondering if I can automate the process?

    I can list 3 dates starting with a record in the database with owner of DW php code:

    <? PHP {? >}

    < div class = "event" >

    <? PHP

    echo $row_rsEvents ["event_date"]. "< br / > ';

    echo $row_rsEvents ['event'],' < br / > ';

    echo $row_rsEvents ["event_details"];

    ? >

    < / div > <! - end event - >

    <? PHP} while ($row_rsEvents = mysql_fetch_assoc ($rsEvents));? >

    I can't hide an expiration date by comparing the date in the database with the current date

    <? PHP

    $date = date('Y-m-d');

    ? >

    <? PHP {? >}

    < div class = 'event' <? PHP if ($date > $row_rsEvents ['event_date']) {echo "style =" display: none;} "" ;} ? > >

    <? PHP

    echo $row_rsEvents ["event_date"]. "< br / > ';

    echo $row_rsEvents ['event'],' < br / > ';

    echo $row_rsEvents ["event_details"];

    ? >

    < / div > <! - end event - >

    <? PHP} while ($row_rsEvents = mysql_fetch_assoc ($rsEvents));? >

    However it then shows just 2 dates in the form of code still loops through the records since the beginning of the database.

    Any ideas or pointers?

    Operating system

    Why don't you do this in the SQL when you select the Recordset?  You can specify WHERE date > = CURRENT_DATE in the SQL string.  Then, you don't have to worry about this in the PHP.

  • By comparing the CLOB

    Hi all

    I have a table with a CLOB (gene sequence) field. When I do an insert, I want to make sure that sequence does not already exist in the table. The table will be ~ 100,000 records. An idea of the best way to handle this? A DBMS CLOB comparison function will be the best way?

    Any help is appreciated more.

    I don't think you want to compare 100 000 time very CLOB, you insert a row.

    The simple solution is to calculate a hash of the CLOB object and index. Two CLOB that are the same will have the same hash, but there is a small chance that two different CLOB will have the same hash. Therefore, you must check if there is a line with the hash already present before inserting it. Just compare the CLOB, if find you one with the same hash.

    DBMS_CRYPTO. HASH() will make the hash for you. You can test how fast various types of hash are and choose the fastest.

    -Phil

  • parser for the clob procedure

    Please need support for this issue,
    I've marked procedure in table Analyzer with clob column, procedure is stop analysis table after analyzing some of the procedure of howevere records is runing but without analysis
    remaining recored
    procdeure is
    ###############################################################################################
    CREATE OR REPLACE PROCEDURE ARCH_DEV.parser_tst (v_src_table varchar2, varchar2 v_trgt_table)
    IS
    CLOB curr_value;
    DELIM number (14);
    ret_value varchar2 (300);
    v_sql VARCHAR2 (250);
    TYPE cur_typ IS REF CURSOR;
    v_cursor2 cur_typ; -Here, you declare a variable for the cursor
    v_ID varchar2 (250); -The variables that save the query retriving data
    CLOB v_Value;

    BEGIN
    v_sql: =' select ITEMID, REC of ' | v_src_table;

    V_cursor2 OPEN FOR v_sql; -WITH THE HELP OF "TESTNEW;
    LOOP
    -Get the retrievied of data by the cursor variables
    EXTRACT v_cursor2 INTO v_ID, v_Value;
    EXIT WHEN v_cursor2% NOTFOUND;

    -the value of the original string
    curr_value: = v_value;

    -Loop to divide the value chain
    loop

    DELIM: = instr (curr_value, chr (254), 1, 1);

    If (delim! = 0)
    Then
    ret_value: = substr (curr_value, 1, (delim-1));
    else - last repeated value
    ret_value: = curr_value;
    end if;


    -Insert in the table target
    run immediately 'insert'. v_trgt_table | "VALUES (' |") ' || v_id||''''||','||''''|| ret_value | " ' ||') ' ;

    -the new value again after the substring
    curr_value: = substr (curr_value, (delim + 1));
    OUTPUT WHEN delim = 0;
    end loop;
    commit;
    end loop;
    CLOSE V_cursor2;
    -END LOOP;
    END parser_tst;
    /

    I create my own test table:

    create the table v_src_table (a number, c clob);

    insert into v_src_table values (1, 'text1, text2, Text3');
    insert into v_src_table values (2, 'example1, example2, 3, example4, Exemple5');
    insert into v_src_table values (3, 'something');

    commit;

    Procedure for analyzing the CLOB in the table is something like that

    declare
    POS pls_integer;
    del pls_integer;
    v_delimiter varchar2 (1): = ', ';
    v_text varchar2 (32767).
    Start
    to news in a loop (select a, v_src_table c)
    POS: = 1;
    loop
    del: = dbms_lob.instr(cur.c,v_delimiter,pos);
    If del = 0 then
    v_text: = dbms_lob.substr (lob_loc-online cur.c, offset-online pos);
    on the other
    v_text: = dbms_lob.substr(cur.c,del-pos,pos);
    POS: = del + 1;
    end if;
    dbms_output.put_line (cur.a |) » '|| v_text);
    If del = 0 then
    "exit";
    end if;
    end loop;
    end loop;
    end;

    1 Text1
    1 Text2
    1 Text3
    2 1 example
    2 example 2
    3 2
    Example4 2
    Exemple5 2
    3 anything

    Answer to your question might be this instr function or substr can not success carried on in CLOB-s that are more than 32767 bytes long, because these functions are string functions.
    Also in my procedure (just for example), you should consider that the substrings between two delimiters is not longer than 32 k. .. and a few other considerations also (nls_length_semantics, nls_characterset).

  • How to load the clob data in a table.

    Hello

    I loaded a column clob with a text file which has about more than 1000 lines, now the clob column has all the records as if it were a line... at the end of each record in the clob column, I think the value of this function: Chr (13)... I think it means end of line or new line something like that.. .my question is how can I move these data in a normal table... .i need a code which share this intro to data rows so I can insert them into a table...

    Thanks in advance...

    OAIS

    Sorry, but my code is designed to give you a starting point for how to address your problem, not a complete solution.

Maybe you are looking for

  • EMERGENCY - Thunderbird freezes, Can not see my mail

    It's really an emergency situation because my company works on email. I downloaded a huge message (many photos) and now Thunderbird freezes when I try to do something. I can't even scroll through my mail, let alone read. I tried to uninstall Thunderb

  • I have a task that repeats every day.

    I have a task that repeats every day. For now, I do it manually. It involves Quicken and Quicken is their backup feature (file > > Backup > > To Disk). How would I go about using Automator to get there?

  • Pavilion HP 11: ethernet port on hp pavilion 11 fried... solution... ?

    Hi all new to the forum here and decided to join because I have a little problem with my laptop... I did something stupid today. I tried to program a hitachi PLC with my laptop and accidentally hooked the ethernet cable to the port of evil on the con

  • Flag 23: Its just exploded

    The sound on my computer just doesn't work anymore, no message, nothing. I have not upgraded or anything. I checked the control panel > hardware and sound an everything looks ok.  I'd appreciate any help you can give me.  Thank you very much

  • TestStand 2014 F1 Patch removes the report itself after execution of finishing

    Hi all today I installed the patch 2014f1 TestStand and after that, I recognized that TestStand removes my reports of ATML5 by itself after execution of finishing. I'm active On-The-Fly Reporting and store reports in different places for each sequenc