Help to extract data Clob to a column in a table that has several lines in a table

Help to extract data Clob to a column in a table that has several lines in a table

It works for only the first line

CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

Grant read, write on DIRECTORY XMLDIR to the public;

() dbms_xslprocessor.clob2file

beef in CLOB,

XMLDIR IN VARCHAR2,

"testfile2.txt" IN VARCHAR2);

DECLARE

buf CLOB.

BEGIN

SELECT H15_DOC

IN buf

OF H15TEST. H15_STAGE

where rownum = 1;

dbms_xslprocessor.clob2file (buf, 'XMLDIR', 'testfile2.txt');

END;

/

-This error code

CREATE or REPLACE DIRECTORY XMLDIR AS ' / orabackups';

Grant read, write on DIRECTORY XMLDIR to the public;

() dbms_xslprocessor.clob2file

XData in CLOB,

XMLDIR IN VARCHAR2,

"testfile2.txt" IN VARCHAR2,

CSID in NUMBER: = 0);

DECLARE

CURSOR xmlmycur IS SELECT H15_DOC

OF H15TEST. H15_STAGE

where rownum = 102140;

l_clob CLOB.

XData CLOB.

BEGIN

DBMS_LOB.CREATETEMPORARY (l_clob, true);

DBMS_LOB.CREATETEMPORARY (xdata, true);

OPEN xmlmycur.

LOOP

SEEK xmlmycur INTO xdata;

dbms_xslprocessor.clob2file (xdata, 'XMLDIR', 'testfile2.txt');

EXIT WHEN xmlmycur % notfound;

END LOOP;

CLOSE Xmlmycur;

END;

/

ORA-21560: 3 argument is null, invalid or out of range

ORA-06512: at "SYS." DBMS_LOB", line 991

ORA-06512: at "XDB". DBMS_XSLPROCESSOR', line 324

ORA-06512: at line 15 level

FYI, it seems that the file being created will exceed 5 gig

Yes, it is a known issue with DBMS_XSLPROCESSOR.clob2file with big files.

Here is a slightly modified version of the code that I posted earlier, fixing WRITE_ERROR except:

DECLARE

v_file utl_file.file_type;

-write a unique to clob

procedure write_clob (p_content in clob) is

v_buffer varchar2 (32767).

V_POSITION pls_integer: = 1;

v_amount pls_integer: = 32767;

Start

loop

Start

DBMS_LOB. Read (p_content, v_amount, v_position, v_buffer);

exception

When no_data_found then exit;

end;

UTL_FILE.put_raw (v_file, utl_raw.cast_to_raw (v_buffer), true);

V_POSITION: = v_position + v_amount;

end loop;

end;

BEGIN

-Open the file

v_file: = utl_file.fopen ('TEST_DIR', 'testfile2.txt', 'wb', 32767);

-loops through the lines

for r in)

Select h15_doc

of h15test.h15_stage

)

loop

write_clob (r.h15_doc);

end loop;

UTL_FILE.fclose (v_file);

END;

/

Tags: Database

Similar Questions

  • How can I find what is the data type of a column of a Table in oracle or SQL?

    (a) what happens if I want to know the type of data in a specific column in the Table.

    (b) how to find the column data types?

    Can someone help me please. I am new to oracle and try to learn a few tricks

    Hello

    How to do

    SQL > desc

    SQL> desc emp
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     EMPNO                                     NOT NULL NUMBER(4)
     ENAME                                              VARCHAR2(10)
     JOB                                                VARCHAR2(9)
     MGR                                                NUMBER(4)
     HIREDATE                                           DATE
     SAL                                                NUMBER(7,2)
     COMM                                               NUMBER(7,2)
     DEPTNO                                             NUMBER(2)
    
  • How to recover the data type of a column in a table?

    Hello

    I want to retrieve the data type of a column in a table. At the moment I'm querying attribute 'OCI_ATTR_DATA_TYPE', but it is SQLT_CHR varchar2 and nvarchar2 data type columns. I need to make a distinction between these columns of two separate data types. Y at - it all API through which I could get the exact data type of a column, i.e. "nvarchar2?

    Thanks in advance.

    Hashim

    Hello

    It is not a very direct way to do it. What you can do is to call OCIDescribeAny on the table that you want to get information. You can then get the OCI_ATTR_CHARSET_FORM attribute for the column. If the value of the attribute that you get is SQLCS_IMPLICIT, that would mean its a varchar/char/varchar2 column regular. If you get SQLCS_NCHAR, this means that the column is NCHAR. You can get the example of it here:

    http://download.Oracle.com/docs/CD/B14117_01/AppDev.101/b10779/oci06des.htm#446491

    Just look for the section "Recovering for a Table column Datatypes".

    Thank you
    Sumit

  • Impossible to extract the data of an additional column in the table advance

    Hello

    We have an obligation to add an extra column to the table of advanced search. In addition, we need sort the table using this additional column.

    Now, we have achieved the following:

    1. the required VO was already extended previously and the additional column (LAST_UPDATE_DATE) is already present in the definition of the EO. So, we just added the tag for LAST_UPDATE_DATE in YOUR XML in the form:

    < ViewAttribute

    Name = "LAST_UPDATE_DATE".

    IsPersistent = "false".

    Type = "Oracle.jbo.domain.date"

    ColumnType = "DATE".

    AliasName = 'LAST_UPDATE_DATE. '

    Expression = "LAST_UPDATE_DATE."

    SQLType = 'DATE' >

    < / ViewAttribute >

    2 added a new MessageStyledText column, and updated the following property:

    Prompt = LastUpdateDate. Discover the Instance = TaskPerzSumVO. Display attribute = LAST_UPDATE_DATE. Sort Allowed = true

    The field is now visible in table advance and whenever we seek, attaches the value as ' 1901-01-01'. While I checked manually in the respective table, we have the appropriate data. But in the front end we do not get the data in our additional column of table in advance. In addition, if we try to sort the table by clicking the column LAST_UPDATE_DATE, we get the NPE error. Spec of NullPointerException is as follows:

    # # 0 in detail

    1. java.lang.NullPointerException

    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:989)

    Kindly help us to obtain the appropriate data in the additional column. Thank you!

    Kind regards

    Zahid

    Hi Zahid,

    This is the error:

    29000: unexpected exception caught: oracle.jbo.NoObjException, msg = Houston-25003: TaskEO.LAST_UPDATE_DATE object of type entity activity not found

    Tag entity by its use should have only name of EO and not the name of the attribute.

    Use instead under the tag:

    EntityUsage = "TaskEO".

    Also, I mentioned that rather tags manually, add it please try Wizard VO to add this attribute in EO attributes available list.

  • How can, during the collection of data, start a new column in my table every 100 data points?

    Hello! I have a problem with my data - I get in a wide range of 1 x 1000, but it's the repeated measures, each taking about 500 data points. I want to break this table for this data string start a new column in my table every 500 points given. I don't know how to do it-please help!

    datacompiler100 wrote:

    Hey thanks for the sponsor and the first off I must apologize for the State, I am attaching my VI. I put the part of the VI that I am working on (my team has access, so didn't post everything here) and also attached the data file (when just written in a spreadsheet file, not through the attached VI). I want to convert the long row of data and then start a new column every 50, 100, 5 points (user-defined).

    Using the data from the file, you can reshape everything simply (as you already!), followed by transposition (since you want columns instead of rows). 2D arrays must always be rectangular, so the last column is filled with zeros if necessary. Is that what you want?

    Of course if you try to add a new column in a file, that will not work. You can only add lines in an existing file because of the way the data is organized. To add columns, the entire file must be read, intertwined and all re-written new data in the file.

  • Disable the previous dating date picker in the column in a table

    can someone please help.

    on the date column in a table, need to disable previous dates.

    Current functionality. But when the validation page gets updated and the user is able to select earlier dates.



    To restrict the datePicker for new lines changed the URL of the button 'Add Row '.

    javascript:myAddRow();

    In the page edit, I added this to "Javascript > function and Variable global statement.

    function myAddRow()

    { apex.widget.tabular.addRow();

    $("td[headers='DETAIL_DATE'] input:last")

    .datepicker("option","changeMonth",false)

    .datepicker("option","minDate",$v("P2_MASTER_MONTH_MINDATE"))

    .datepicker("option","maxDate",$v("P2_MASTER_MONTH_MAXDATE")); };

    https://Apex.Oracle.com

    w/u/p: nani5048/test/test

    App 92603 5 page

    Thank you

    Nani

    I created a dynamic action

    the loading of the page

    $("td [en-têtes = 'STATUS_DATE'] entrée")

    . DatePicker ("option", "minDate", $v ("P5_MASTER_MONTH_MINDATE"));

    as well as the global javascript function

    function myAddRow() {}

    apex.widget.tabular.addRow ();

    $("td [en-têtes = 'STATUS_DATE'] entrée")

    . DatePicker ("option", "minDate", $v ("P5_MASTER_MONTH_MINDATE"));

    }

  • Input data match with two columns in a table

    Hello

    I want to find records where the input data (> 100 records) are adapted to the two columns of the table

    See below
    with t as
    (select 1 as id, 101 as num 'ram' that pat from dual
    Union
    Select 2 102, 'tom' from dual
    Union
    Select 1 103, 'tom1' from dual
    Union
    Select 2 101, 'tom2' from dual
    Union
    Select 2 104, 'tom3' from dual
    Union
    Select 1 105, 'tom1' from dual
    Union
    Select 2 105, 'tom1' from dual

    )
    Select * from t

    I want to find records from the 't' table where (id, num) will be (1 101, 2 102, 1, 105)

    Output must be

    ID num
    1 101
    2 102
    1 105
    select *
    from t
    where  (id, num) in (
              (1,101),
              (2,102),
              (1,105)
                 );
    

    Or store the input in a temporary table values and use IN

    select *
    from t
    where  (id, num) in (
              select col1,col2
                                    from your_temp_table
                 );
    

    Published by: JAC on 20 may 2013 14:55

  • Change data type for the column in a table - Oracle 8i

    Team,

    I need to change a VARCHAR2 column in number.

    ALTER table xyz change number abc;

    By giving the above statement, it says I need empty this column before you change.

    I can't change the data type before emptying this column.

    Please indicate any other solution. Give me some suggestions.

    Empty the column for me here BIG task.

    user11081688 wrote:
    I can't change the data type before emptying this column.

    Not according to the documentation:

    You can change the data type of any column or decrease the size of the entire column if all rows in the column contains NULL values.

    Please indicate any other solution. Give me some suggestions.

    You can add another column with the correct data type.

    ALTER TABLE xyz ADD COLUMN def NUMBER;
    UPDATE TABLE xyz SET def = TO_NUMBER(abc);
    ALTER TABLE xyz DROP COLUMN abc;
    ALTER TABLE xyz ADD COLUMN abc NUMBER;
    UPDATE TABLE xyz SET abc = def;
    ALTER TABEL xyz DROP COLUMN xyz;
    

    If I remember correctly, Oracle 8i does not support the change of name of column if this solution is a bit more complicated than 9i and above. Another option would be to create a new table with CREATE TABLE AS... SELECT, drop the old one and rename a new one to the old.

  • Help to extract data from XML

    Hello

    We ask a web service via PL/SQL. The XML that is returned seems to have ' & amp; ' Lt; "instead of < and '& amp; GT; "instead of >.

    When I try to draw the values I don't do anything. How can I get the values from this XML file for attributes? Also, how to get the attributes in separate columns?

    Here are the XML, opinion, I added & amp, so you can see what I do when you look in the DB:
    < doSelectResponse xmlns = "http://www.ca.com/UnicenterServicePlus/ServiceDesk" >
    < doSelectReturn xmlns = "" > & amp; Lt;? XML version = & amp; quot; 1.0 & amp; quot; Encoding = & amp; quot; UTF-8 & amp; quot;? & amp; GT;
    & amp; Lt; UDSObjectList & amp; GT;
    & amp; Lt; UDSObject & amp; GT;
    & amp; Lt; Handle & amp; GT; CR:400318 & amp; Lt; / handle & amp; GT;
    & amp; Lt; Attributes & amp; GT;
    & amp; Lt; Attribute DataType = & amp; quot; 2002 & amp; quot; & amp; GT;
    & amp; Lt; AttrName & amp; GT; ref_num & amp; Lt; / AttrName & amp; GT;
    & amp; Lt; AttrValue & amp; GT; 819 & amp; Lt; / AttrValue & amp; GT;
    & amp; Lt; / attribute & amp; GT;
    & amp; Lt; Attribute DataType = & amp; quot; 2002 & amp; quot; & amp; GT;
    & amp; Lt; AttrName & amp; GT; Summary & amp; Lt; / AttrName & amp; GT;
    & amp; Lt; AttrValue & amp; GT; Can you please put this circuit on the Tberd and see if there is any mistakes & amp; Lt; / AttrValue & amp; GT;
    & amp; Lt; / attribute & amp; GT;
    & amp; Lt; / attributes & amp; GT;
    & amp; Lt; / UDSObject & amp; GT;
    & amp; Lt; / UDSObjectList & amp; GT;
    < / doSelectReturn >
    < / doSelectResponse >
    I threw the XML in a clob, and trying to get the AttrValue like this:
    SELECT ID, clob001
          ,XMLTYPE.createxml(c.clob001).extract('//AttrValue/text()','xmlns=""').getStringVal() val
      FROM jlb_tmp c
    We are on 9.2.0.6 version of the DB, the upgrade to 11g soon, but not before I have to get this to work.

    Thanks in advance for your help,
    -Johnnie

    Published by: johnniebillings on March 30, 2011 17:35

    Published by: johnniebillings on March 30, 2011 19:51

    If someone could explain it, I'd be happy.

    Short answer: bug.

    Oracle 9i is known to have bugs about the handling of XML, especially when using namespaces. Also note that 9i was not yet fully compliant W3C.
    You have circumvented the problem by using a shaft going down in the XPath expression, so without going through the selection of the root node labelled by a space.

  • Problem to extract data from a single column

    Hello

    I have a requirement where I have to get three records (intf. INTERFACE_DEF_ID, b2b. B2B_TPA_DEF_ID, osb. OSB_INF_DEF_ID) for the select statement for a particular column (val_id)

    The following query is in error.

    Help, please...

    Select

    (intf. INTERFACE_DEF_ID or b2b. B2B_TPA_DEF_ID or osb. OSB_INF_DEF_ID) as val_id

    Of

    ABC. INTERFACE_DEF intf,

    ABC. B2B_TPA_DEF b2b,

    ABC. OSB_INF_DEF OSB;

    Thank you.

    Although the errors because it's just syntactically incorrect in all directions.  Essentially, the SELECT statement is not yet valid.

    Create view abc_v_6 AS

    Select INTERFACE_DEF_ID val_id OF ABC. Union INTERFACE_DEF all the

    Select B2B_TPA_DEF_ID FROM ABC. B2B_TPA_DEF Union all the

    Select OSB_INF_DEF_ID FROM ABC. OSB_INF_DEF;

  • need help to extract data based on the date

    i want to  write the query for the below statements ?
    
    1) net_bank_cr from rm_memorandum for the previous year end 31st March
    
    2) net_bank_cr from rm_memorandum for the as on date
    
    3) net_bank_cr from rm_memorandum as one year prior to current reporting date
    
    The table structure of rm_memorandum is as given below:
    
    create table RM_MEMO
    (
    AS_ON_DT DATE,
    PAID_CAPITAL NUMBER(20,2),
    TOTAL_OBE NUMBER(20,2),
    CR_EQI_OBE NUMBER(20,2),
    NET_BANK_CR NUMBER(20,2),
    ADJ_NET_BANK_CR NUMBER(20,2),
    DEP_CURREMT_CRR NUMBER(20,2),
    LIAB_OTH_CRR NUMBER(20,2),
    TOTAL_CRR NUMBER(20,2)
    ) 

    is can be as...

    /* Formatted on 2011/10/12 14:38 (Formatter Plus v4.8.8) */
    WITH t AS
         (SELECT TO_DATE ('31/12/2010', 'dd/mm/yyyy') as_on_dt, 205 net_bank_cr
            FROM DUAL
          UNION ALL
          SELECT TO_DATE ('15/03/2011', 'dd/mm/yyyy'), 205
            FROM DUAL
          UNION ALL
          SELECT TO_DATE ('15/03/2011', 'dd/mm/yyyy'), 666
            FROM DUAL
          UNION ALL
          SELECT TO_DATE ('31/03/2011', 'dd/mm/yyyy'), 9856
            FROM DUAL
          UNION ALL
          SELECT TO_DATE ('31/03/2011', 'dd/mm/yyyy'), 521
            FROM DUAL
          UNION ALL
          SELECT TO_DATE ('05/04/2011', 'dd/mm/yyyy'), 20
            FROM DUAL
          UNION ALL
          SELECT TO_DATE ('07/05/2011', 'dd/mm/yyyy'), 965
            FROM DUAL)
    --
    SELECT *
      FROM t
     WHERE t.as_on_dt
              BETWEEN CASE
              WHEN (SYSDATE > ADD_MONTHS (TRUNC (t.as_on_dt, 'YYYY'), 3) - 1)
                 THEN ADD_MONTHS (TRUNC (ADD_MONTHS (SYSDATE, -12), 'YYYY'), 3)
                      - 1
              WHEN (SYSDATE <= ADD_MONTHS (TRUNC (t.as_on_dt, 'YYYY'), 3) - 1)
                 THEN ADD_MONTHS (TRUNC (ADD_MONTHS (SYSDATE, -24), 'YYYY'), 3)
                      - 1
           END
                  AND CASE
              WHEN (SYSDATE > ADD_MONTHS (TRUNC (t.as_on_dt, 'YYYY'), 3) - 1)
                 THEN ADD_MONTHS (TRUNC (SYSDATE, 'YYYY'), 3) - 1
              WHEN (SYSDATE <= ADD_MONTHS (TRUNC (t.as_on_dt, 'YYYY'), 3) - 1)
                 THEN ADD_MONTHS (TRUNC (ADD_MONTHS (SYSDATE, -12), 'YYYY'), 3)
                      - 1
           END
    /
    

    Kind regards
    friend

  • Extract data from complex XML of XMLType with nodes parents containing several internal nodes

    Hello

    I use Google geocoding XML Web Service to try to enrich some geo data in the database. I've kept all the Google result in an XMLType column, the result is something like this:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < GeocodeResponse >

    < status > OK < / status >

    < result >

    Zip_code < type > < / type >

    < formatted_address > 76279, Saudi Arabia < / formatted_address >

    < address_component >

    < > 76279 long_name < / long_name >

    < > 76279 short_name < / short_name >

    Zip_code < type > < / type >

    < / address_component >

    < address_component >

    < long_name > Northern Frontier Province < / long_name >

    < short_name > Northern Frontier Province < / short_name >

    administrative_area_level_1 < type > < / type >

    < Type > policy < / type >

    < / address_component >

    < address_component >

    < long_name > Saudi Arabia < / long_name >

    < short_name > SA < / short_name >

    country of < type > < / type >

    < Type > policy < / type >

    < / address_component >

    < geometry >

    < location >

    < lat > 29.1214197 < / lat >

    < LNG > 44.3945656 < / LNG >

    < / location >

    < location_type > APPROX. < / location_type >

    < window >

    < Southwest >

    < lat > 29.1016132 < / lat >

    < LNG > 44.3654665 < / LNG >

    < / Southwest >

    < Northeast >

    < lat > 29.1400926 < / lat >

    < LNG > 44.4116001 < / LNG >

    < / Northeast >

    < / window >

    < limits >

    < Southwest >

    < lat > 29.1016132 < / lat >

    < LNG > 44.3654665 < / LNG >

    < / Southwest >

    < Northeast >

    < lat > 29.1400926 < / lat >

    < LNG > 44.4116001 < / LNG >

    < / Northeast >

    < / delimits >

    < / geometry >

    < place_id > ChIJcy767DIAYxURohAm-DLSunw < / place_id >

    < / result >

    < result >

    locality < type > < / type >

    < Type > policy < / type >

    Foucart, France < formatted_address > < / formatted_address >

    < address_component >

    < long_name > Foucart < / long_name >

    < short_name > Foucart < / short_name >

    locality < type > < / type >

    < Type > policy < / type >

    < / address_component >

    < address_component >

    < long_name > Seine-Maritime < / long_name >

    < > 76 short_name < / short_name >

    administrative_area_level_2 < type > < / type >

    < Type > policy < / type >

    < / address_component >

    < address_component >

    < long_name > upper Normandy < / long_name >

    < short_name > upper Normandy < / short_name >

    administrative_area_level_1 < type > < / type >

    < Type > policy < / type >

    < / address_component >

    < address_component >

    < long_name > France < / long_name >

    < short_name > EN < / short_name >

    country of < type > < / type >

    < Type > policy < / type >

    < / address_component >

    < geometry >

    < location >

    < lat > 49.6131170 < / lat >

    < LNG > 0.5951040 < / LNG >

    < / location >

    < location_type > APPROX. < / location_type >

    < window >

    < Southwest >

    < lat > 49.6019770 < / lat >

    < LNG > 0.5731880 < / LNG >

    < / Southwest >

    < Northeast >

    < lat > 49.6329760 < / lat >

    < LNG > 0.6081609 < / LNG >

    < / Northeast >

    < / window >

    < limits >

    < Southwest >

    < lat > 49.6019770 < / lat >

    < LNG > 0.5731880 < / LNG >

    < / Southwest >

    < Northeast >

    < lat > 49.6329760 < / lat >

    < LNG > 0.6081609 < / LNG >

    < / Northeast >

    < / delimits >

    < / geometry >

    < place_id > ChIJQdTiHHJc4EcRUIO2T0gUDAQ < / place_id >

    < / result >

    < / GeocodeResponse >


    Here are practically two entries from geo (the /result of xml nodes), and each entry has multiple secondary entries of type address_component and a secondary entrance to the geometry of type.


    I can get the entries in the result of this query:


    SELECT xt.*

    OF zip_tree_sort_xml x,.

    XMLTABLE ("' / GeocodeResponse/result")

    PASSAGE x.google_geodata_xml

    COLUMNS

    Path of 'FORMATTED_ADDRESS' VARCHAR2 (200) "formatted_address".

    ) xt;


    The subnodes XML type address_component and type geometry of teas and those below:


    SELECT xt.*

    OF zip_tree_sort_xml x,.

    XMLTABLE ('/ GeocodeResponse/result/address_component ')

    PASSAGE x.google_geodata_xml

    COLUMNS

    Path of "LONG_NAME' VARCHAR2 (200)"long_name. "

    'SHORT_NAME' VARCHAR2 (500) PATH 'short_name ',.

    Path ACCESS VARCHAR2 (200) from 'TYPE_1' 'type [1]. "

    Path ACCESS VARCHAR2 (200) to 'TYPE_2' 'type [2].

    ) xt;


    SELECT xt.*

    OF zip_tree_sort_xml x,.

    XMLTABLE ("/ GeocodeResponse/result/geometry/location")

    PASSAGE x.google_geodata_xml

    COLUMNS

    "latitude" NUMBER PATH 'lat ',.

    "longitude" NUMBER PATH 'LNG '.

    ) xt;


    But y at - it anyway to join the two subnodes XML below with the parent that above? So I can only get correct result attributes?

    Best regards

    Rodriguez

    But y at - it anyway to join the two subnodes XML below with the parent that above? So I can only get correct result attributes?

    You can do chaining XMLTABLE another that will handle the address_component expandable nodes.

    Data from the geometry node can be extracted at the same level as a result.

    SQL> select x1.formatted_address
      2       , x2.long_name
      3       , x2.short_name
      4       , x2.type_1
      5       , x2.type_2
      6       , x1.latitude
      7       , x1.longitude
      8  from zip_tree_sort_xml t
      9     , xmltable('/GeocodeResponse/result'
     10         passing t.google_geodata_xml
     11         columns
     12           formatted_address   varchar2(200) path 'formatted_address'
     13         , address_components  xmltype       path 'address_component'
     14         , latitude            number        path 'geometry/location/lat'
     15         , longitude           number        path 'geometry/location/lng'
     16       ) x1
     17     , xmltable('/address_component'
     18         passing x1.address_components
     19         columns
     20           long_name   varchar2(200) path 'long_name'
     21         , short_name  varchar2(500) path 'short_name'
     22         , type_1      varchar2(200) path 'type[1]'
     23         , type_2      varchar2(200) path 'type[2]'
     24       ) x2 ;
    
    FORMATTED_ADDRESS       LONG_NAME                   SHORT_NAME                   TYPE_1                         TYPE_2       LATITUDE  LONGITUDE
    ----------------------- --------------------------- ---------------------------- ------------------------------ ---------- ---------- ----------
    76279, Saudi Arabia     76279                       76279                        postal_code                               29,1214197 44,3945656
    76279, Saudi Arabia     Northern Borders Province   Northern Borders Province    administrative_area_level_1    political  29,1214197 44,3945656
    76279, Saudi Arabia     Saudi Arabia                SA                           country                        political  29,1214197 44,3945656
    Foucart, France         Foucart                     Foucart                      locality                       political   49,613117   0,595104
    Foucart, France         Seine-Maritime              76                           administrative_area_level_2    political   49,613117   0,595104
    Foucart, France         Upper Normandy              Upper Normandy               administrative_area_level_1    political   49,613117   0,595104
    Foucart, France         France                      FR                           country                        political   49,613117   0,595104
    
    7 rows selected.
    
  • Disable previous Dates for date picker in the column in a table

    Hi all

    I'm in the form of the building where it contains details of the Transaction and I want to provide validations for start date and end date by disabling dates previous calendar datepicker.

    I wrote Javascript code in page load >service and global variables declaration:

    function f_disable_date(pThis){
        var row_id  = pThis.id.substr(4);  
        var start_date = $('#f02_'+row_id).val(); 
        
        //$(function() {
        $( "#f02_" ).datepicker({ minDate: -4});
    //});
    }
    

    But it is not disable dates. Please provide suggestion to make it work.

    APEX VERSION: 5.0

    Kind regards.

    See page 3

    I created a dynamic action

    real action on page load

    $("td [en-têtes = 'START_DATE'] entrée")

    . DatePicker ("option", "minDate", $v ("P3_X"));

    in P3_X

    matches the element hidden with select (sysdate-4) double value;

    its working fine

    But at the time of the Add_row()

    Just call it by making it as a javascript function so that it is also applicable to the new line

    I hope you got the point

  • Insert several lines with dynamic data

    Hello
    When I do an insert into a table that has several lines of dynamic information. on
    a page, it inserts all rows that are dynamically filled. I want only what he
    to insert the lines that I choose the initials on. How can I do? Let's say I
    have 5 items that are displayed on a page and I want to insert only original
    the first 2 because the last 3 are left blank, how should I do this? I tried
    implementation of an if statement that says:

    < cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".

    Then make the insertion in the table

    < cfelse >
    < / cfif >

    I have this game were also up in a loop that says:

    < cfloop index = "help" list = "" #form.listofids # "delimiters =",">"

    Here is the code for just the insertion. I also have a code here
    Update another table. I got this to work, so I just try to get the insertion
    works fine for the moment. I can not use this where the query statement:
    Where ItemID = #id # because I'm trying to insert into the table of approval, not
    the items table. The table is just updated with some other info. in
    a few other input boxes.

    < cfloop index = "help" list = "" #form.listofids # "delimiters =",">"
    < cfif "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".

    < cfquery Datasource = '#application. DataSource #">"
    Insert into accreditation (APV_ItemID,
    APV_ECID,
    Document_Type,
    Approval_Initials)

    Values (' #Evaluate ("form.) (' ItemID # help # ") #',
    ' #Evaluate ("form. ("ECID # help #") #',
    < cfif isDefined (form '. ') ("Help of # PNR_Doc_Type # ') and
    "form. "Help of # PNR_Doc_Type #" NEQ "" > "".
    ' #Evaluate ("form. ("Help of # PNR_Doc_Type # ') #',
    < cfelse >
    NULL,
    < / cfif >

    < cfif isDefined (form '. ') ("Help of # PNR_Approval_Initials # ') and
    "form. "Help of # PNR_Approval_Initials #" NEQ "" > "".
    ' #Evaluate ("form. (Aide de # PNR_Approval_Initials #») #
    < cfelse >
    Null value
    (< / cfif >)

    < / cfquery >

    < / cfif >
    < / cfloop >

    On the page display, just a table of dynamic info. Here are the 4
    things that I have on this page that needs to be inserted to the database.

    < input type = "hidden" name = "' ECID #ItemID #" value = "#ECID #" > "
    < input type = "hidden" name = "' ItemID #ItemID #" value = "#ItemID #" > "
    < input type = "hidden" name = "" PNR_Doc_Type #ItemID # ' value = "PNR Req" > "

    < td align = "center" >
    < cfif Approval_Initials is not "" > "".
    #Approval_Initials #.
    < cfelse >

    < select name = "PNR_Approval_Initials #ItemID #" >
    < option value = "" > select initials < / option >
    < cfloop query = "ShowInitials" >
    < Cfif Engineer_Initials EQ 1 >
    < option value = "#Initials #" > #Initials # < / option >
    < / cfif >
    < / cfloop >
    < / select >

    < / cfif >
    < table >

    Can someone help me please on just the insertion in the database so that it
    will insert on the lines that I chose the initials on and not others? Thank you.

    Andy

    You almost managed, but I see that you have commented.

    (" The help of # PNR_Approval_Initials # ') AND form ["PNR_Approval_Initials # help #" ""] NEQ "" >

    Do things here

  • wanted to extract data from nested table pl/sql Ref Cursor getting an erro

    create or replace type 'DEPT12' as an object (dno number (2), dname varchar2 (30), varchar2 (50)) loc;

    create or replace type dept_tab in the table in "DEPT12".

    create or replace type 'LOC12' as an object (locno number, loc_name varchar2 (100))

    create or replace type loc_tab in the table of "LOC12.

    create or replace type dept_loc_rec1 as an object (dept_tab, eno number, loc_dt loc_tab dept_dt);

    Create type dept_loc_tb as table of the dept_loc_rec1

    create table dept_loc_tb_bk1 (dept_dt dept_tab, eno number, loc_dt loc_tab)
    NESTED TABLE dept_dt
    STORE AS dept_tab12,
    NESTED TABLE loc_dt
    STORE AS loc_tab12




    insert into dept_loc_tb_bk1 values (dept_tab (dept12(3,'ABD','LOC')
    dept12(4,'ABD','LOC')
    (, dept12(5,'ABD','LOC')), 3, loc_tab (loc12(21,'AAB'),
    loc12(22,'AAB'),
    loc12(23,'AAB')));

    When I try to extract data from Ref cursor to pl/sql table that I get an error ora-06504: pl/sql: return types of the result set of variables or request do not match.
    I created a table nested, as well as the pl/sql nested table object dept_loc_tb and I said the same dept_loc_tb lv_dept_loc_tb, but trying to get in this variable we get an error above.

    Please anyone can solve my problem.
    -----------------
    declare
    type cr is ref cursor;
    cr_obj cr;

    lv_dept_loc_tb dept_loc_tb;

    Start
    Open cr_obj to select dept_dt, eno, dept_loc_tb_bk1 loc_dt;
    collect the fetch cr_obj in bulk in lv_dept_loc_tb;
    close cr_obj;
    end;

    Your query selects 3 distinct columns requires so 3 collections of matching types. You want to treat these 3 columns as an object of type DEPT_LOC_REC1:

    SQL> declare
      2  type cr is ref cursor;
      3  cr_obj cr;
      4
      5  lv_dept_loc_tb dept_loc_tb;
      6
      7  begin
      8  open cr_obj for select dept_dt,eno,loc_dt from dept_loc_tb_bk1;
      9  fetch cr_obj bulk collect into lv_dept_loc_tb;
     10  close cr_obj;
     11  end;
     12  /
    declare
    *
    ERROR at line 1:
    ORA-06504: PL/SQL: Return types of Result Set variables or query do not match
    ORA-06512: at line 9
    
    SQL> declare
      2  type cr is ref cursor;
      3  cr_obj cr;
      4
      5  lv_dept_loc_tb dept_loc_tb;
      6
      7  begin
      8  open cr_obj for select DEPT_LOC_REC1(dept_dt,eno,loc_dt) from dept_loc_tb_bk1;
      9  fetch cr_obj bulk collect into lv_dept_loc_tb;
     10  close cr_obj;
     11  end;
     12  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.
    P.S. discover sys_refcursor.

Maybe you are looking for

  • Toshiba L 39, 4333 restarts after being turned to connected PC

    Hello LED LCD L 39, 4333 correctly starts up and displays PC connected via VGA.Turning also TV on and off work initially and PC is displayed correctly. BUT:If the TV is turned off for long time > 30 min - 1 h with connected PC TV refuses to turn new

  • HomeKit and Apple TV

    «Make sure your Apple TV is on the same Wi - Fi network as your accessories HomeKit and about 25 feet from your Accessories Bluetooth HomeKit.» Two elements, 1.) can the apple tv report devices it can 'see '? If not, why? 2.) can ATV be connected? (3

  • CP1025nw Installer hangs after firmware update

    Downloaded and executed recommended for printer CP1025nw. appeared to be upgraded but stopped wireless update. I downloaded and ran the latest version of the software and drivers Setup, but it crashed right after installing the drivers. Printer worki

  • DAQmx error strings (for analog sampling)

    I have a simple VI who reads a few analog voltages. However, if I have the wiring channels ErrorIN/ErrorOut of the DAQmxtiming.vi to the DAQmxread.vi the tensions are no longer displayed. Someone knows why this happens?

  • When I start to drivermax to update my driver site, it gives more trouble

    mentioned above, it is a updatersite of pilot during the update of my pilots its giving me problems frequently