Modifying the Inner Query Statement in FORMS 10g

Hi,
I have a form with a Search Criteria section. The user builds the search criteria by puting values in the ITEMS. Then I want to query the table USING the criteria entered by the user.
I know this is possible.
How would I modify ORACLE's query statement in the form.
I did this a VERY LONG time ago (forms 4.0), but don't remember how to !!!
Please Help,
Marc.

Hi ,
declare
   v_where varchar2(600);
  begin
     v_where:='<your where statement>';
     SET_BLOCK_PROPERTY(<your_block_name>,DEFAULT_WHERE,V_WHERE);
     execute_query;
  end;Greetings,
Sim

Similar Messages

  • How to get the SQL Query statement of a Search Form ?

    Hi all,
    We have a requirement to send the query result of an ADF Search Form into report application (Crystal rpt).
    Crystal can accept data source as query statement. SO I think of getting the exact query statement "generated" by the ADF Search form and send it to crystal.
    Is this possible ?
    Thank you very much,
    xtanto

    Try the various get methods of the viewObject such as getQuery:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtAnchor.getQuery%28%29/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CViewObject%7Ehtml/

  • Modifying the sql query in doDML of entity

    I am using Jdev 11.1.1.4.0 and SQLServer Database
    I want to modify the sql query in "doDML(int operation, TransactionEvent e)"
    I could check what kind of operation like (operation == DML_UPDATE) and do some additional stuff.. But I want to edit the query because of which we entered doDML..
    I want to edit the query because when i use SQLServer database with SQLBuilder as SQL92, the update statement will have table alias like "update table <table alias>" which the SQLServer is not recognizing.. So I want to remove that alias from sql query in doDML..

    It isn't possible.
    However as per the following MSDN page a table alias is fine in an UPDATE statement so are you sure this is your problem?: http://msdn.microsoft.com/en-us/library/aa260662(v=sql.80).aspx
    CM.

  • How to get the report server name in Forms 10g.

    How to get the report server name in Forms 10g.
    I'm using the Application Server 10g 10.1.2.

    Hello,
    I do not think that you can get this value from anywhere. A solution is to put the Reports server name in an environment variable stored in the /forms/server/default.env file, then to query it at Forms runtime with the TOOL_ENV.Getvar() built-in.
    Francois

  • How to replace the forms6i menu parameter in forms 10g after migration

    Hai,
    We have forms6i application and we are going to migrate forms6i into forms 10g .The forms 6i have the menu userdefine parameter.But forms 10g don't have the option. so please send me the suggesstion what we can do .Is there any alternative way.How to bring the same funtionality in forms 10g after the migration.pls reply me
    THANKS

    We had the same problem - you could develop a new form just to accept the necessary user input, but that might be overkill. We used Forms Editors, displaying them with an appropriate startup text e.g. 'Parameter1='. The user then types in the parameter, then we check the new Editor text and pull out the info we need.

  • How to check the source query of tabular form ....

    Hi All ,
    is there any way to change the source query of tabular form ......
    ya ... i could see it in the source but it is normal sql query ....
    where as to generate the addrow functionality the sql query must be
    Select empno , ADD_ITEM.TEXT(1,empno), ename ,ADD_ITEM.TEXT(2,ename)................
    then where can i find this query .?
    i could see that ADD button is calling ADDROW process and which inreturn calling ADD function ....
    can any one tell me , where to see the code for this ADD function ....
    as i checked it in db ..... it is not there at all.

    You can have a look here for the manual tabular forms:
    http://apex.oracle.com/pls/otn/f?p=31517:170
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Frm-40505:ORACLE error: unable to perform query in oracle forms 10g

    Hi,
    I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.
    Please let me know what do i need to do to correct this problem.
    Regards,
    Priya

    Hi everyone,
    I have block created on view V_LE_USID_1L (which gives the error frm-40505) . We don't need any updation on this block, so the property 'updateallowed' is set to 'NO'.
    To fix this error I modified 'Keymode' property, set it to 'updatable' from 'automatic'. This change solved the problem with frm-40505 but it leads one more problem.
    The datablock v_le_usid_1l allows user to enter the text (i.e. updated the field), when the data is saved, no message is shown. When the data is refreshed on the screen, the change done previously on the block will not be seen (this is because the block updateallowed is set to NO), how do we stop the fields of the block being editable?
    We don't want to go ahead with this solution as, we might find several similar screens nad its diff to modify each one of them individually. When they work properly in 6i, what it doesn't in 10g? does it require any registry setting?
    Regards,
    Priya

  • Storing an Excel File in the Oracle Table through Oracle Form (10g)

    Hi,
    We have the below requirement in the Oracle Forms (10g).
    Database: 11g
    Application: R12
    We need to provide an upload functionality to the user, so that he can upload an excel file into the form (from the local system), this is achived.
    Now what we need to do is that we need to capture the path of the document (in the local system) and we need to store the document in a Oracle table.
    Next we need to validate the records that are being loaded and the error records should be written into one more file and that file also we need to store in an Oracle table, this is because, i need to query this error file from the table later and need to send to the user as an e-mail.
    Basically i started off with the below code just for the POC. but iam facing the error. Please help. I did not put this code in my form.
    Create Table Email_Attachments(Id_Pk Integer Primary Key,Fname Varchar2(50),Image Blob);
    Create Or Replace Directory Temp As 'C:\';
    Create Or Replace Procedure Load_File(Pi_Id In Integer, Pfname In Varchar2) Is
    Src_File Bfile;
    Dst_File Blob;
    Lgh_File Binary_Integer;
    Begin
    Src_File := Bfilename('TEMP', Pfname);
    Insert Into Email_Attachments (Id_Pk,Fname,Image)
    Values (Pi_Id,Pfname, Empty_Blob())
    Returning Image Into Dst_File;
    Dbms_Lob.Open(Src_File, Dbms_Lob.File_Readonly);
    Lgh_File := Dbms_Lob.Getlength(Src_File);
    Dbms_Lob.Loadfromfile(Dst_File, Src_File, Lgh_File);
    Dbms_Lob.Close(Src_File);
    Commit;
    End;
    begin
    Load_File(1,'test.txt');
    end;
    ERROR
    ORA-22288: file or LOB operation FILEOPEN failed
    No Such file or directory
    ORA-06512: at "SYS.DBMS_LOB", line 1014
    ORA-06512: at "SYS.LOAD_FILE", line 10
    ORA-06512: at line 2
    How to capture the Path from which he has loaded the file?
    How to Write the error records it to the file and store it in an Oracle table?
    Will the below table be of use to me?
    fnd_lobs_document
    fnd_lobs
    fnd_documents
    Please share your ideas as to how to acheive this.
    Thanks and Regards
    Srinivas

    When you want to process the file, them it depends on the format. "Excel file" is a term that is used for a variety of file formats, mostly simple CSV, binary (true) XLS and XLSX.
    So to get help you have to give us more information. Since the file is already in the db you might get better answers at {forum:id=75}. The forum has a FAQ that has a whole section {message:id=9360007}.
    Regards
    Marcus

  • Query-by-example Forms 10g

    Hi,
    I'm kind of embarrassed to be asking such a basic question, but here goes.
    In earlier versions of Forms, it was easy to put &A into a field, and on execute query, Forms would pop up a box, and you could write "&a is null" (or some other more complex query fragment) which allowed you do a query for situations were a field was null.
    You can't seem to do this now in forms 10g.
    You can still put "# is null" into a field if the query length is long enough I know, but I have seen no documentation on the loss of this query by example facility.
    We're using v10.1.2 by the way.
    As usual, any help gratefully received.
    cheers
    Tony

    You're right ...
    Found this : http://groundside.com/blog/DuncanMills.php?m=200407 (search for QBE on the page). Not sure what the setting is for 10g - I assume FORMS_RESTRICT_ENTER_QUERY
    Otherwise it is as you say ...
    Steve

  • How to Edit the Title (file name) on forms 10g Screen.

    Hi ,
    How can one edit the Title ,and <(file name)> on forms 10g Screen ....
    I tried editing through the forms module preperty palette , but could n't change the Title, or file name on forms menu screen ...
    I guess , the entries are made through some other means...
    Please let me know on how to do this .
    Need a quicker reply ..
    Thanks in Advance
    Sanu

    using the below code too not getting me the new names entered by me ... still the old title names are comingWhat do you mean by new nemes? It will return you the actual file name which is saved in phycical location and form name will return you the module name which displays when you open forms in builder.
    Or you mean something else then its better to provide any example..like what is happening actually with you.
    -Ammad

  • How to implement the spell check in oracle forms 10g or 6i...

    How to implement the spell check in oracle forms.
    Is there any different method is there.
    Please help me....
    Praveen.K

    Here is one different from Jspell..
    In 6i client/server you can call MS Word spell checker using OLE. Below sample code for 6i.
    For 10g you will need webutil to use same code. install webutil and just replace "OLE2." with "CLIENT_OLE2."
    PROCEDURE spell_check (item_name IN VARCHAR2)
    IS
       my_application   ole2.obj_type;
       my_documents     ole2.obj_type;
       my_document      ole2.obj_type;
       my_selection     ole2.obj_type;
       get_spell        ole2.obj_type;
       my_spell         ole2.obj_type;
       args             ole2.list_type;
       spell_checked    VARCHAR2 (4000);
       orig_text        VARCHAR2 (4000);
    BEGIN
       orig_text := NAME_IN (item_name);
       my_application := ole2.create_obj ('WORD.APPLICATION');
       ole2.set_property (my_application, 'VISIBLE', FALSE);
       my_documents := ole2.get_obj_property (my_application, 'DOCUMENTS');
       my_document := ole2.invoke_obj (my_documents, 'ADD');
       my_selection := ole2.get_obj_property (my_application, 'SELECTION');
       ole2.set_property (my_selection, 'TEXT', orig_text);
       get_spell :=ole2.get_obj_property (my_application, 'ACTIVEDOCUMENT');
       ole2.invoke (get_spell, 'CHECKSPELLING');
       ole2.invoke (my_selection, 'WholeStory');
       ole2.invoke (my_selection, 'Copy');
       spell_checked := ole2.get_char_property (my_selection, 'TEXT');
       spell_checked :=SUBSTR (REPLACE (spell_checked, CHR (13), CHR (10)),1,LENGTH (spell_checked));
       COPY (spell_checked, item_name);
       args := ole2.create_arglist;
       ole2.add_arg (args, 0);
       ole2.invoke (my_document, 'CLOSE', args);
       ole2.destroy_arglist (args);
       ole2.RELEASE_OBJ (my_selection);
       ole2.RELEASE_OBJ (get_spell);
       ole2.RELEASE_OBJ (my_document);
       ole2.RELEASE_OBJ (my_documents);
       ole2.invoke (my_application, 'QUIT');
       ole2.RELEASE_OBJ (my_application);
    END;Call it like this: SPELL_CHECK ('BLOCK.MY_TEXT_ITEM' );

  • Issue with case when try to modify the siimple query

    Hello PL/SQL Gurus/Experts,
    I am stuck with an issue (could be simple) but not gettings any headsway -
    select 365/day_num_yr Anul_Fact from Date where date_dt = trunc(sysdate -1) value returns is as - 1.46
    need to write this in the form of case (as i need to multiply this to some other outer query), i want to store it ina variable and and then use the same in outer one -
    but when use the following then it is always returning the value as 0 and not the same output as returned by the above query without case.
    select (case when date_dt =trunc(sysdate -1) then 365/day_num_yr else 0 END) Anul_Fact Kindly help, i appericate your time and effort in advance.

    Thanks for providing the Drop table and CTAS script. It eased the job of creating sample data;
    I only used few data from the table:
    drop table T4;
    create table T4(day_num_yr, date_dt) as
    select 249, to_date('09/05/2012', 'MM/DD/YYYY') from dual union all
    select 250, to_date('09/06/2012', 'MM/DD/YYYY') from dual union all
    select 251, to_date('09/07/2012', 'MM/DD/YYYY') from dual union all
    select 252, to_date('09/08/2012', 'MM/DD/YYYY') from dual;
    select date_dt, sysdate - 1 prev_dt, trunc(sysdate - 1) trunc_prev_dt,
           case when date_dt = trunc(sysdate - 1) then 365 / day_num_yr
                else 0
           end num_day
      from t4;
    DATE_DT                   PREV_DT                   TRUNC_PREV_DT             NUM_DAY               
    05-SEP-12                 06-SEP-12                 06-SEP-12                 0                     
    06-SEP-12                 06-SEP-12                 06-SEP-12                 1.46                  
    07-SEP-12                 06-SEP-12                 06-SEP-12                 0                     
    08-SEP-12                 06-SEP-12                 06-SEP-12                 0See the output. For Date_DT as 6-Sep, i.e. a Day before Today, we are getting the Output, but for other dates we are not.
    One another suggestion I would like to make is, (assuming) you are using the Table only for storing the Current day of Year and not including Public Holidays etc. then you can use a 'DDD' format model to get the Current Day of year starting 1 Jan.
    Something like below:
    select date_dt, sysdate - 1 prev_dt, trunc(sysdate - 1) trunc_prev_dt,
           case when date_dt = trunc(sysdate - 1) then 365 / to_char(date_dt, 'DDD')
                else 0
           end num_day
      from t4;

  • Need single record for single period. Modify the select query.

    Requirement
    THere are 6 programs for each company for each billing period. If anyof the program for one billing period and period_balance>0 then display outstanding balance YES. if period_balance <=0 for all the programs for one period then outstanding balance=NO
    Below is the query i have used but i have to modify the query to get single record for each period whether outstandignbalance yes or no. Please help to resolve this issue. OR modify the query.
    select distinct B_Billing_key, B_COMPANY_ID company ,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) lastPaymentdate,
    SURCH_AMOUNT,ADJUST_AMOUNT,PI_AMOUNT,AMOUNT,
    (nvl(SURCH_AMOUNT,0)+nvl(ADJUST_AMOUNT,0)+nvl(PI_AMOUNT,0))-(nvl(sum(AMOUNT),0))"Period_Balance",
    decode(sign((nvl(SURCH_AMOUNT,0)+nvl(ADJUST_AMOUNT,0)+nvl(PI_AMOUNT,0))-(nvl(sum(AMOUNT),0))),1, 'Yes'
    ,'No'
    ) outstandingbalance
    p.PROGRAM_NAME_ID programname
    FROM tuff_balance_view,MV_PROG_SURCH S,MV_PAYMENT_HOLDING H,MV_PROGRAM_DICT P where
    b_company_id = 'U-7052-C'
    and B_Billing_key=s.BILLING_KEY
    and S.PROGRAM_KEY = P.PROGRAM_KEY
    and P.PROGRAM_KEY= H.PROGRAM_KEY
    GROUP BY B_Billing_key,B_COMPANY_ID,B_REPORT_PERIOD,SURCH_AMOUNT,ADJUST_AMOUNT,PI_AMOUNT,PROG_SURCH_KEY,
    S.PROGRAM_KEY,p.PROGRAM_NAME_ID,AMOUNT
    order by B_Billing_key desc
    B_Billing_key is the primary key. I am looking for the output only one record for each biling perid. there are 6 programs for each billing period. if any of the program has period balance >0 then outstanding balance should be yes. For sample i am giving 2 programs.
    Actual output from the above
    biling_key company billing period period_balance outstandingbalance programname
    123 xyz January 2011 $4 Yes ABC
    123 xyz January 2011 $-5 NO DEF
    456 xyz February 2011 $-3 NO ABC
    456 xyz February 2011 $- 2 NO DEF
    Need the output as below from the above query. Can you please help to simplify query. If anyof theprogram having outstanding balance for that particular period show the outstandigbalance as yes. Else NO.
    Expected output as below
    company billing period outstandingbalance programname
    xyz January 2011 Yes ABC
    xyz February 2011 No DEF
    Thanks,
    vi

    Hi G,
    With the same query i am gettting outs as NO for all months which is not true. can you pelase look at the following data.
    SELECT DISTINCT B_BILLING_KEY,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    B_company_id company,
    sum((nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))) "PeriodBalance",
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) LastPaymentDate,
    decode(sign(
    (nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))), 1,'Yes','No') Outs
    FROM mv_program_dict P, tuff_balance_view T WHERE
    b_company_id = 'U-7052-C' group by B_REPORT_PERIOD,B_company_id,B_BILLING_KEY,B_ORG_SURCH_AMOUNT,
    B_ORG_PI_AMOUNT,P_AMOUNT
    order by B_BILLING_KEY desc
    Actual
    Billing key Billing company periodbalance lastpayment date outs
    110631534073     November 2010     U-7052-C     270          Yes
    110631534073     November 2010     U-7052-C     690          Yes
    110631534073     November 2010     U-7052-C     66          Yes
    110461533197     October 2010     U-7052-C     4740          Yes
    110461533197     October 2010     U-7052-C     27000          Yes
    110461533197     October 2010     U-7052-C     0          No
    110251532527     September 2010     U-7052-C     0     09/13/10     No
    110251532527     September 2010     U-7052-C     0          No
    110251532527     September 2010     U-7052-C     -18     09/13/10     No
    110251532484     August 2010     U-7052-C     0     09/13/10     No
    110251532484     August 2010     U-7052-C     2001     09/13/10     Yes
    110251532484     August 2010     U-7052-C     0          No
    Expectedoutput(need only following columns)
    Billing key Billing company lastpayment date outs
    110631534073     November 2010     U-7052-C               Yes
    110461533197     October 2010     U-7052-C               Yes
    110251532527     September 2010     U-7052-C          09/13/10     No
    110251532484     August 2010     U-7052-C          09/13/10     YES
    By using below query i am getting all output as NO. HOw to modify it.
    SELECT company,
    billing,LastPaymentDate,
    CASE
    WHEN SUM (DECODE (outs, 'YES', 1, 0)) > 0 THEN 'YES'
    ELSE 'NO'
    END Outstanding
    FROM (
    SELECT DISTINCT B_BILLING_KEY,
    to_char(to_date('01/'||trim(substr(B_REPORT_PERIOD,5,2))||'/'||
    trim(substr(B_REPORT_PERIOD,1,4)),'DD/MM/YYYY'),'Month YYYY') Billing,
    B_company_id company,
    sum((nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))) "PeriodBalance",
    Max(to_char(P_RECEIVED_DATE,'MM/DD/YY')) LastPaymentDate,
    decode(sign(
    (nvl(T.B_ORG_SURCH_AMOUNT,0)+nvl(T.B_ORG_PI_AMOUNT,0))-(nvl(T.P_AMOUNT,0))), 1,'Yes','No') Outs
    FROM mv_program_dict P, tuff_balance_view T WHERE
    b_company_id = 'U-7052-C' group by B_REPORT_PERIOD,B_company_id,B_BILLING_KEY,B_ORG_SURCH_AMOUNT,
    B_ORG_PI_AMOUNT,P_AMOUNT
    order by B_BILLING_KEY desc)
    GROUP BY company, billing,LastPaymentDate;
    Note:in the actual out put max(lastpayment date) is returing null values. if there is any date in one billing return that date only remove null example is september. in september it should return only 09/13/10 this date not null date. but if there is no other within one biling then consider that as null example november..
    Thanks,
    v

  • Using the inner query to filter outer query

    hi
    i've tried finding an old post on this, but there's nothing quite what im looking for. I have an inner query which gets sales totals, and an outer query with an outer join to return all the weeks (even when there are no sales):-
    select wk.week_id,sum(sales_total)
    from (select week, sum(sales) sales_total from tbl_sales_A
    where week between 0801 and 0807
    group by week
    UNION ALL
    select week, sum(sales) sales_total from tbl_sales_B
    where week between 0801 and 0807
    group by week)
    , tbl_weeks wk
    WHERE
    wk.week_id=week(+)
    AND wk.week_id BETWEEN 0801 AND 0807
    GROUP BY wk.week_id
    this gives me the following results:-
    week_id sales
    0801 0
    0802 0
    0803 55
    0804 66
    0805 96
    0806 0
    0807 97
    I would like my query to only return results from the first week sales are made i.e. 0803. The results would like this:-
    0803 55
    0804 66
    0805 96
    0806 0
    0807 97
    How do i write my query so that it does this???
    Many thanks for your time.
    Message was edited by:
    user645692

    On a test data:
    SQL> with test_data as (
      2    select 0801 as week_id, 0 as sales_total from dual union all
      3    select 0802, 0  from dual union all
      4    select 0803, 55  from dual union all
      5    select 0804, 60 from dual union all
      6    select 0804, 6  from dual union all
      7    select 0805, 90  from dual union all
      8    select 0805, 6  from dual union all
      9    select 0806, 0 from dual union all
    10    select 0807, 97 from dual
    11  )
    12  select week_id, sales_week_total
    13  from (
    14    select wk.week_id,sum(sales_total) as sales_week_total,
    15      sum(sum(sales_total)) over (order by wk.week_id rows between unbounded preceding and current row) as sales_so_far
    16    from test_data wk
    17    GROUP BY wk.week_id
    18  )
    19  where sales_so_far <> 0
    20  ;
       WEEK_ID SALES_WEEK_TOTAL
           803               55
           804               66
           805               96
           806                0
           807               97Regards,
    Dima
    Message was edited by:
    DimaCit

  • Would it be faster to use a trigger or modify the insert query?

    We have a table that currently has latitude, longitude columns and are trying to decide what route to go as far as adding spatial data to future records. A spatial index will be placed on the new column.
    There appear to be 3 solutions:
    1 Create a materialized view which creates the spatial column based on the current latitude and longitude columns.
    2 Create a trigger on the table that will populate the new spatial column on insert/update.
    3 Modify the code to insert a spatial value into the new spatial column.
    Due to the nature of the data we are not willing to use method 1.
    What we are trying to figure out is which method, 2 or 3, will insert faster.
    Has anyone done tests to determine if an insert with a spatial object is slower than an insert on a table with a trigger that creates a spatial object?
    Thanks,
    Pat

    Pat,
    Note that you don't need to store latitude, longitude in sdo_geometry type in order to spatially index it. Instead you can create a function that returns an sdo_geometry based on two numeric columns, then create a function based index on that. Its described here:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11830/sdo_exten.htm#i1005799
    Also note that in the sdo_geometry type, you need to define the data as longitude/latitude and not the other way around.
    If you do want to create a column with sdo_geometry column, I'd recommend your third option. As a general principle I avoid triggers unless absolutely necessary. Triggers invariably lead to confusion when you (or someone else) revisits this code in the future. Also the change of context between and SQL and PL/SQL has a performance hit. Here's a simple test:
    SQL> CREATE TABLE long_lat_no_trigger (
      2     geometry                SDO_GEOMETRY);
    Table created.
    SQL>
    SQL> CREATE TABLE long_lat_with_trigger (
      2     longitude               NUMBER,
      3     latitude                NUMBER,
      4     geometry                SDO_GEOMETRY);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE TRIGGER long_lat_to_geometry
      2  BEFORE INSERT ON long_lat_with_trigger FOR EACH ROW
      3  DECLARE
      4  BEGIN
      5     :new.geometry := SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(
      6     :new.longitude, :new.latitude, NULL), NULL, NULL);
      7  END;
      8  /
    Trigger created.
    SQL>
    SQL> SET TIMING ON
    SQL> INSERT INTO long_lat_no_trigger (geometry) (
      2     SELECT
      3     SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(
      4     dbms_random.value(0,180), dbms_random.value(0,90),
      5     NULL), NULL, NULL)
      6     FROM DUAL
      7     CONNECT BY LEVEL <= 1000000);
    1000000 rows created.
    Elapsed: 00:00:31.96
    SQL>
    SQL> INSERT INTO long_lat_with_trigger (longitude, latitude) (
      2     SELECT
      3     dbms_random.value(0,180),
      4     dbms_random.value(0,90)
      5     FROM DUAL
      6     CONNECT BY LEVEL <= 1000000);
    1000000 rows created.
    Elapsed: 00:01:21.15Cheers,
    John

Maybe you are looking for