Query update using checkbox

I have an admin page for a secure site where I am trying to
add a function using a checkbox to create a true-false condition on
each record in a database. What I have is a webpage with several
records (pulled from the database using the cfquery loop, and
assigned an ID that is stored in the database). Each record on the
page has a checkbox; checked=true. What I want to do is make it
possible to edit the checkboxes on the page, then have the user
refresh the page using a submit button on the form, which will then
update the database. However, I'm having a problem passing the
value of the checkbox correctly to a cf page to run the update
query and refresh the page.
What values am I passing forward from a form using a
checkbox, and what datatype should I be using to store that value
in a SQL Server 2000 database? (Right now I'm testing with Access.)
How do I convert the value from the checkbox to the true/false
condition for the database to fit that datatype?
My understanding is, the criterion for a checked box is
checked="checked", and nothing if not checked. But how do I check
to see if that value has changed? I'd rather do this without
Javascript.
Thanks!

Tried it. Didn't work.
Here's the code:
<td><input type="checkbox" <cfif
(#GetHeadlines.Show# EQ true)>checked="checked"</cfif>
value="chk#getheadlines.id#" /></td>
Here is also the code it's going to:
<cfif isdefined ("form.value")>
Value: #form.value#<br />
</cfif>
For good measure, I thought I'd include the form declaration:
<form name="update" action="update_admin.cfm"
method="post">
This is just for testing purposes for now. However, I'm
getting nothing on the back end page. So the value isn't being
passed. I must be doing something wrong with the form, but
what?

Similar Messages

  • Update using checkboxes

    I have a new web page where the user wants to be able to check off lines on a very extensive list to reconcile them with a customer's report. I'm using a report like this:
    select DATE_INDEX, EQUIP_ID
           , DESCRIP, WT, HAUL_BY, FLAG
        from (
        select c.DATE_INDEX as DATE_SORT
             , j.JOB_START_TIME as TIME_SORT
             , to_char(c.DATE_INDEX,'Mon DD') as DATE_INDEX
             , to_char(c.EQUIP_ID) as EQUIP_ID
             , to_char(c.EMP_ID) as EMP_ID
             , to_char(j.JOB_START_TIME,'HH:MI AM') as JOB_START_TIME
             , to_char(j.JOB_END_TIME,'HH:MI AM') as JOB_END_TIME
             , 'Load at '||s.SHORT_NM||', Unload at '||f.FACTORY_NM as DESCRIP
             , to_char(NVL(j.MAN_SPOT_WT,0),'999G990D00') as WT
             , apex_item.display_and_save(48,'TS') as HAUL_BY
             , apex_item.display_and_save(49,j.LOAD_JOB_ID) as JOB_ID
             , apex_item.checkbox(50,j.RECONCILE_FLAG,null,null) as FLAG
          from TC c, TC_LOAD_JOBS j, LOAD_RATES r, FACTORIES f, STATIONS s
         where c.TC_ID = j.TC_ID and j.LOAD_RATE_ID = r.LOAD_RATE_ID
           and j.FACTORY_ID = f.FACTORY_ID
           and FN_STN_KEY(j.FACTORY_ID, j.STATION_ID) = s.KEY_ID
           and r.ROPA_FLAG = 1
           and DECODE(:P961_TYPE,99,j.RECONCILE_FLAG,:P961_TYPE) = j.RECONCILE_FLAG
           and c.VEH_LOC in (select ORG_ID from ORG_ENTITIES
               where MNG_ORG_ID = :P961_ORG_ID)
           and c.DATE_INDEX BETWEEN to_date(:P961_FROM_DT,'MM/DD/YYYY')
               and to_date(:P961_TO_DT,'MM/DD/YYYY')
        union all
        select c.DATE_INDEX as DATE_SORT
             , NULL as TIME_SORT
             , to_char(c.DATE_INDEX,'Mon DD') as DATE_INDEX
             , c.UNIT_ID as EQUIP_ID
             , '-IND-' as EMP_ID
             , NULL as JOB_START_TIME
             , NULL as JOB_END_TIME
             , 'Load at '||s.SHORT_NM||', Unload at '||f.FACTORY_NM as DESCRIP
             , to_char(NVL(j.ACT_SPOT_WEIGHT,NVL(j.AVG_SPOT_WEIGHT,0)),'999G990D00') as WT
             , apex_item.display_and_save(48,'OTHR') as HAUL_BY
             , apex_item.display_and_save(49, j.JOB_ID) as JOB_ID
             , apex_item.checkbox(50,j.RECONCILE_FLAG,null,null) as FLAG
          from TC_3RDPARTY c, TC_3RDPARTY_JOBS j, LOAD_RATES r, FACTORIES f, STATIONS s
         where c.TC_ID = j.TC_ID and j.LOAD_RATE_ID = r.LOAD_RATE_ID
           and j.FACTORY_ID = f.FACTORY_ID
           and FN_STN_KEY(j.FACTORY_ID, j.STATION) = s.KEY_ID
           and r.ROPA_FLAG = 1
           and DECODE(:P961_TYPE,99,j.RECONCILE_FLAG,:P961_TYPE) = j.RECONCILE_FLAG
           and c.VEH_LOC in (select ORG_ID from ORG_ENTITIES
               where MNG_ORG_ID = :P961_ORG_ID)
           and c.DATE_INDEX BETWEEN to_date(:P961_FROM_DT,'MM/DD/YYYY')
               and to_date(:P961_TO_DT,'MM/DD/YYYY')
      ) where rownum <= 500
    order by DATE_SORT, TIME_SORTbecause obviously the only field I want them changing is the RECONCILE_FLAG field.
    I know that checkboxes are dicey in that they either exist (when checked) or don't exist, so using them in loops is somewhat problematic. I'm trying to use something like this:
    declare
    begin
        for i in 1..apex_application.g_f49.count loop
          IF apex_application.g_f48(i) = 'TS' THEN
            update TC_LOAD_JOBS
               set RECONCILE_FLAG = NVL(apex_application.g_f50(i),0)
             where LOAD_JOB_ID = apex_application.g_f49(i);
          ELSIF apex_application.g_f48(i) = 'OTHR' THEN
            update TC_3RDPARTY_JOBS
               set RECONCILE_FLAG = NVL(apex_application.g_f50(i),0)
             where JOB_ID = apex_application.g_f49(i);
          END IF;
        end loop;
    end;to allow the update.
    Can someone spot check and tell me if this is going to work or if I'm going to have to incorporate another loop inside the main loop to handle the checkbox?

    I don't think that's going to fly. The size of the checkbox array reflects the volume of items checked on the page, thus if your report contains 20 rows but only 5 of them are checked (at random intervals, say), your loop is going to fall over at the value i=6, because apex_application.g_f50(6) won't exist. The method I've used before is to assign the value of the checkbox to a key value (depending on your data model but in this case, probably j.TC_ID) and my query will use that method to update.
    Alternatively, if you were able to generate and utilize the row number for your dataset (i.e. store the row number as the checkbox value, instead of), you iterate through a loop of the checkbox array, in a sort of "tail wagging the dog" manner. In other words, the checkbox value would provide index value for the array of the ID that uniquely identifies your tuple. like so:
    for i in 1..apex_application.g_f50.count loop
    update TC_LOAD_JOBS
               set RECONCILE_FLAG =  <whatever your checked value is>     
          where LOAD_JOB_ID = apex_application.g_f49(apex_application.g_f50(i));
    end loop;

  • MultiRow Update using CheckBox

    I have a multi-row table and the user is supposed to check/un-check a check box to indicate which row needs to be updated. After the user clicks on the save button, I want to process each row and set a field in the row to a certain value based on the checkbox value (true or false)
    Using Jdeveloper 10.1.3.2.

    Hi,
    have a look at example 117 at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    If you want to use this information to update a field then this can be done without the detour of using a temporary unbound checkbox
    Frank

  • Update multiple records using checkbox

    Hi All,
    I have one requirement related to multiple record update using checkbox.
    HTML form has 6 columns and many rows.
    Now i want to update all 6 columns in the table for selected checkbox.
    Can any body give me some idea/code about this.
    Thanks in advance.
    Ravi

    I did not understand your idea.
    multiple columns can be updated as follows...
    update table set col1=value,col2=value,col3=value where conditions;
    We are using adodb driver in our environment. So I will explain concern to it. Store all the form new values in $var array and you can pass this $var to query execution.
    A vague idea
    $rs = $conn->Execute($update_sql,$var);     
    if ($rs===false) die('DB Error: '. $conn->ErrorMsg() );

  • I want single update query without use the function.

    I want to update sells_table selling_code field with max date product_code from product table.
    In product table there is multiple product_code date wise.
    I have been done it with below quey with the use of function but can we do it in only one update query
    without use the function.
    UPDATE sells_table
    SET selling_code = MAXDATEPRODUCT(ctd_vpk_product_code)
    WHERE NVL(update_product_flag,0) = 0 ;
    CREATE OR REPLACE FUNCTION HVL.maxdateproduct (p_product IN VARCHAR2) RETURN NUMBER
    IS
    max_date_product VARCHAR2 (100);
    BEGIN
    BEGIN
    SELECT NVL (TRIM (product_code), 0)
    INTO max_date_product
    FROM (SELECT product_code, xref_end_dt
    FROM product
    WHERE TO_NUMBER (p_product) = pr.item_id
    ORDER BY xref_end_dt DESC)
    WHERE ROWNUM = 1; -- It will return only one row - max date product code
    EXCEPTION
    WHEN OTHERS
    THEN
    RETURN 0;
    END;
    RETURN max_date_product;
    END maxdateproduct;
    Thanks in Advance.

    Hi,
    Something like this.
    update setlls_table st
            set selling_code =(select nvl(trim(product_code)) from 
                                  (select product_code
                                          , rank() over (partition by item_id order by xref_end_dt DESC) rn
                                       from product
                                   ) pr
                                   where rn =1
                                         and pr.item_id = st.ctd_vpk_product_code
                               ) where NVL(update_product_flag,0) = 0 ;As such not tested due to lack of input sample.
    Regards
    Anurag Tibrewal.

  • SQL Query (updateable report) CheckBox Update Problem

    My process will update 1 or 2 rows, but fails on three or more rows. All the rows on the page can be processed, up to 2 at a time.
    The SQL Query Report can have 50 rows on a page. Only the check box and the hidden primary key column are returned by the report to the process (marked as edit).
    If I issue the update myself, I can update any number of rows with no error.
    If I change the update SQL to a select, it works for the all of the checked lines (the correct count is displayed in the process message.
    The only thing I see for the failure is a url
    http://d101dbaxeaa2llb:10700/apex/wwv_flow.accept
    Process is:
    DECLARE
    vRow BINARY_INTEGER;
    item NUMBER;
    BEGIN
    item := 0;
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
    item := item + 1;
    vRow := apex_application.g_f01(i);
    update #OWNER#.B_ATT_DAYS_FUT
    set day_status_cd =
    case
    when day_status_cd = -1 and day_dt is not null then 2
    when day_status_cd = -1 and day_dt is null then 0
    when day_status_cd = 6 then 7
    else 2
    end
    where days_pk = to_number(apex_application.g_f02 (vRow));
    END LOOP;
    :P35_CHECKED_CT := item;
    END;
    This is in APEX Application Express 3.1.0.00.32 on Oracle 11.1.0.6.0.

    Query is at the end. The Report Regions is a SQL Query (Updatable Report).
    I don't thinks this is my code problem.
    The system I'm using is dieing. It has had two disk crashes, which spinrite brought back. I've restored from a partition image and a full cold backup. Then I've had a number of blue screen failures. One of the DBAs working for me rebuilt the 11g instance on a VM and restored the cold backup. Everything runs fine there. I even applied the latest code export from the failing systems development workspace to the VM based system. Still runs fine.
    There are a number of abends in the alert log ORA-07445 and ORA-21779 for which our on-site ASC Engineer has opened a TAR/SR. I suspect that some part of one of the FLOW tablespaces was damaged, a part which deals with runtime APEX. Build time is running fine. Application just does not, either as a runtime or in the development system.
    We are moving to a new AIX server, just finishing the setup and then I can send over the exports. That should put this to bed.
    SELECT
    DAYS_PK
    , NAME_TX
    , DAY_CD
    , DAY_DESC_TX
    , DAY_STATUS_CD
    , DAY_STATUS_DESC_TX
    , DAY_DT
    , REASON_TX
    , TEN_DAY_PERIOD_FL
    , EARNED_ON_DT
    , EXPIRES_ON_DT
    , PLANNED_ON_DT
    , GUARANTEED_DAY_CD
    , GUARANTOR
    FROM
    (SELECT
    DAYS."DAYS_PK"
    , A_ATT_USERS.NAME_TX
    , DAYS."DAY_CD"
    , DAY_CD."DAY_DESC_TX"
    , DAYS."DAY_STATUS_CD"
    , DAY_ST_CD."DAY_STATUS_DESC_TX"
    , DAYS."DAY_DT"
    , DAYS."REASON_TX"
    , DAYS."TEN_DAY_PERIOD_FL"
    , DAYS."EARNED_ON_DT"
    , DAYS."EXPIRES_ON_DT"
    , DAYS."PLANNED_ON_DT"
    , CASE DAYS."GUARANTEED_DAY_CD"
    WHEN 'E' THEN 'GUARANTEED'
    WHEN 'R' THEN 'GUARANTOR'
    ELSE NULL
    END GUARANTEED_DAY_CD
    , G_ATT_USERS.NAME_TX "GUARANTOR"
    FROM
    "B_ATT_DAYS_FUT" DAYS
    LEFT OUTER JOIN "A_ATT_USERS" G_ATT_USERS
    ON
    "DAYS"."GUARANTEED_COMIT_ID" = "G_ATT_USERS"."COMIT_ID"
    LEFT OUTER JOIN "A_ATT_USERS"
    ON
    "DAYS"."COMIT_ID" = "A_ATT_USERS"."COMIT_ID"
    , "T_ATT_DAY_CD" DAY_CD
    , "T_ATT_DAY_STATUS_CD" DAY_ST_CD
    WHERE
    DAYS."DAY_CD" = DAY_CD."DAY_CD"
    AND DAYS."DAY_STATUS_CD" = DAY_ST_CD."DAY_STATUS_CD"
    AND DAYS.COMIT_ID IN
    SELECT DISTINCT
    ( R.COMIT_ID )
    FROM
    ATT_ATTENDANCE.A_ATT_STAFF_ROLE R
    WHERE
    R.COMIT_ID <> :P1_COMIT_ID_HIERARCHY START
    WITH R.COMIT_ID = :P1_COMIT_ID_HIERARCHY
    CONNECT BY PRIOR R.COMIT_ID = R.MGR_COMIT_ID
    AND DAYS.DAY_STATUS_CD IN ( 1, -1, 6 )
    AND DAYS.COMIT_ID <> :P1_COMIT_ID
    ORDER BY
    A_ATT_USERS.NAME_TX
    , DAYS.DAY_DT
    , DAYS.DAY_CD DESC
    , DAYS.EARNED_ON_DT)
    WHERE
    INSTR(UPPER(NAME_TX),UPPER(COALESCE(:P35_S_NAME,NAME_TX))) > 0

  • Require Code which export SQL Query resuluts to excel using checkbox option

    Hi All,
    I need a sample code which can export the SQL Query results directly to an excel file using checkbox option. for example
    if I select checkbox1 and press a save button, then on backend SQL Query will execute and save the results in a excel file and so on.
    Thanks in advance..
    Regards,
    Chetan

    Thanks for the Code.
    Actually I need a code which is based on combo base values and when I click on Button, the SQL Query will execute using SQL Connection string and the results from that query will save into a excel file. Below is the screenshot of the form. Hope this will
    clear the requirements.
    Hello,
    To be honest, this forum is not for coding for anybody.
    You could refer to the suggestions shared above, and if you get any issue when using that code, you could share the code and error with us, we will focus on your code to help you.
    You could separate them into multiple steps, like the following.
    1. Getting the value of any control, like the textbox and combobox or even checkbox.
    2. Execute method inside button click event handler.
    3. Using ado.net to execuate sql query.
    4. Saving data to Excel.
    Then you could have a try step by step, if you get any issue, then post it in another thread with the code and error message.
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need Sample Code in C#  to Insert,Update,Query data using W 2.0 wsdl

    Hi,
    Can anyone please share sample code in C# to Insert,Update,Query data using W 2.0 wsdl.
    Thanks in advance

    I have found solution.
    Need add following line for non string data type.
    objOutreachUpdateList.Opportunity[0].IndexedNumber0Specified = true;

  • WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER

    Dear Sir,
    please any one can answer me as soon as possible its very urgent
    WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER
    I     As oracle mapviewer Chapter 8 (Oracle Maps) says generating our own Web based mapping application we are trying to generate our own maps for our own data contains in our layers like example boundary lines and roads and etc. and we are following complete example as described in Oracle Mapviewer Document Chapter 8.
    Before this step we tried with demo data downloaded from OTN mvdemo. And we downloaded latest demo today itself from the OTN and imported into our database schema called mvdemo. And we copied all three jar files mvclient and mvconnection and mvpalette into our jdeveloper .
    II.     We created a jsp to execute the following code from oracle mapviewer chapter 8 documents
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/customizable" prefix="cust"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jwcache.tld"
    prefix="jwcache"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld"
    prefix="fileaccess"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jesitaglib.tld"
    prefix="JESI"%>
    <f:view>
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html" charset=UTF-8>
    <TITLE>A sample Oracle Maps Application</TITLE>
    <script language="Javascript" src="jslib/loadscript.js"></script>
    <script language=javascript>
    var themebasedfoi=null
    function on_load_mapview()
    var baseURL = " http://localhost:8888/mapviewer/omserver";
    // Create an MVMapView instance to display the map
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    // Add a base map layer as background
    mapview.addBaseMapLayer(new MVBaseMap("mvdemo.demo_map"));
    // Add a theme-based FOI layer to display customers on the map
    themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
    themebasedfoi.setBringToTopOnMouseOver(true);
    mapview.addThemeBasedFOI(themebasedfoi);
    // Set the initial map center and zoom level
    mapview.setCenter(MVSdoGeometry.createPoint(-122.45,37.7706,8307));
    mapview.setZoomLevel(4);
    // Add a navigation panel on the right side of the map
    mapview.addNavigationPanel('east');
    // Add a scale bar
    mapview.addScaleBar();
    // Display the map.
    mapview.display();
    function setLayerVisible(checkBox){
    // Show the theme-based FOI layer if the check box is checked and
    // hide the theme-based FOI layer otherwise.
    if(checkBox.checked)
    themebasedfoi.setVisible(true) ;
    else
    themebasedfoi.setVisible(false);
    </script>
    </head>
    <body onload= javascript:on_load_mapview() >
    <h2> A sample Oracle Maps Application</h2>
    <INPUT TYPE="checkbox" onclick="setLayerVisible(this)" checked/>Show customers
    <div id="map" style="width: 600px; height: 500px"></div>
    </body>
    </html>
    </f:view>
    <!--
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>mapPage</title>
    </head>
    <body><h:form binding="#{backing_mapPage.form1}" id="form1"></h:form></body>
    </html>
    -->
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_mapPage--%>
    III.     When we run this jsp it’s giving us following Two errors
    1     Error:     ‘MVMapView’ is undefined
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    2     Error:     ‘themebasedfoi’ is null or not an object
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    Please let us know what could be problem as soon as possible. Very urgent
    Please let us know where we can find Mapviewer AJAX API’s for Jdeveloper Extention
    Thanks
    Kabeer

    I currently use parameters, and they are passed from the form to the report. Report is then generated based on a function returning ‘strongly typed’ cursor. The ‘strongly typed’ cursor in my case returns a record consisting of an orderly collection of fields.
    This collection of fields is returned by another function that relies on the IF … THEN logic.
    However, the number of IF ... THEN statements is quite large (currently 64 covering all possible combinations of 6 parameters available in the form).
    I would like to avoid the large number of IF … THEN statements, and hope that there is a way of passing a string to a query, where the Dynamic SQL would in Select close and Where close reflect parameters passed by the form.
    In addition to this I would like to avoid creating and populating a table or a view dedicated to the report, because this may lead to a conflict in case of multiple users concurrently generating reports with different choice of parameters.
    Edited by: user6883574 on May 28, 2009 9:16 PM

  • "Enable Disk Use" checkbox is grayed out, can't untick.

    Hi,
    I just got my new iPod 30 GB video today! I've been reading these discussions, but haven't found an answer for this tiny problem of mine.
    "Do Not Disconnect" constantly shows on the iPod screen when it's connected on the computer. Many have suggested ticking off "Enable Disk Use", but here's the problem: it's grayed out, and I can't change it, no matter what. I've gone through iTunes prefs, by right-clicking on the iPod in iTunes and selecting "iPod Options". My system seems to show iPod as a movable disk, but iTunes recognises it and I can easily put music into it, so I guess that isn't a problem (or is it?).
    But how could I get my hands on the "Enable Disk Use" checkbox? It just isn't "tickable" now.
    Thanks!
      Windows XP  

    If you have your iPod set to manual update, the "Enable Disk Use" box will be greyed out and ticked by default, in that case use Safely remove Hardware icon or check this link: "Disconnecting iPod from your computer
    " http://docs.info.apple.com/article.html?artnum=61135
    For Info:
    The iPod offers three ways to transfer music from your computer. You can select one of the following update modes from the iPod Preferences menu in iTunes (Edit=>Preferences=>'iPod' tab):
    1) Automatically update all songs and playlists. This is the default mode, in which your entire music library, including playlists, is automatically synced to your iPod. If the music library on your computer exceeds the iPod storage capacity, you are prompted to select a different update method.
    2) Automatically update selected playlists only. With this option, iTunes automatically copies the playlists you have selected to the iPod when you connect it to the computer.
    3) Manually manage songs and playlists. You can also choose to transfer music to the iPod manually. This allows you to drag and drop individual songs and playlists from iTunes to the iPod.

  • How to undo update of checkbox after triggering when-new-record-instance

    Hi,
    I am using eBusiness Forms Personalization in 11.5.10 to alter the Receipts form in Purchasing. I want to prevent users checking the rcv_transaction checkbox if the destination is "Multiple" and, instead, click the "+" sign to explode the multiple record into it's many component records.
    I can do this by invoking the when-new-record-instance trigger to make the "multiple" record fields unalterable and issue a warning message when the user selects such records. However, my problem is that - if the user clicks the checkbox as the first field in a "multiple" record, then this updates the checkbox to "Yes" BEFORE the trigger fires, which then locks the record for update.
    What I need is a solution that either sets the checkbox to unalterable for "multiple" records BEFORE the user clicks into such records, OR a method of undoing the update of the checkbox after the record has been selected (I cannot do this by simply setting it to "No" by the trigger as this is still technically an update and locks the record).
    Cheers
    Graham

    Hi Navnit,
    Yes you are right, but it can work even we not plase quotation mark in it. But Yes I forget to place semi colon so now it is
    IF :System.Cursor_Record = 1 THEN
       :Block.Col1 := '02:00';
    ElsIF :System.Cursor_Record = 2 THEN
       :Block.Col1 := '07:00';
       ------and so on
    END IF;Danish

  • Linking Access tables, creating a query with using both Access and Oracle

    Hello,
    I am using 3.0.04.34 version Oracle Developer. I am supposed to create a script/procedure to use both Access tables and oracle tables together. There is an option in developer to copy the access tables into oracle. But it doesn't help me. Because when we updated the access tables
    the copied ones are not be updated. How can I created a linked access tables to oracle and create a query with using both access and oracle table together.
    I will appreciate if you guys help me. I look forward to hearing from you guys.
    Thanks,
    Pinar

    Pinar,
    to be able to query MS Access tables in Oracle you need an additional product, the Oracle Database Gateway for ODBC. It allows you to link any foreign database into an Oracle database using a suitable ODBC driver. You can then access the MS Access tables through a database link based on the Database Gateway for ODBC. This will also allow you to join local Oracle and remote MS Access tables from your Oracle database.
    There's a note on My Oracle Support which gives you more details:Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
    And there's also a dedicated Forum: Heterogeneous Connectivity

  • Limit on updates using select_list_from_lov?

    Hello All,
    Wondering if anyone knew if there was a limitation on APEX as far as how many rows one can update using a select_list_from_lov or select_list_from_query? My query can return as little as 2 rows to as many as 450 rows.
    I noticed if I reduce my number of rows allowed per view the update process works just fine reason why I was wondering if there is a limit and is there any way to up that limit?
    I have an update process similar to:
    FOR i IN 1 .. HTMLDB_APPLICATION.g_f02.COUNT
    LOOP
    UPDATE TABLE_1
    SET FIELD_1 =
    REPLACE (HTMLDB_APPLICATION.g_f03(i), '%' || 'null%', NULL),
    FIELD_2 =
    REPLACE (HTMLDB_APPLICATION.g_f05(i), '%' || 'null%', NULL),
    WHERE ID = to_number(HTMLDB_APPLICATION.g_f02 (i));
    END LOOP;
    COMMIT;
    END;
    Thanks.

    Zala - I can't see how your page works. Can you show an example on apex.oracle.com? Also, you didn't describe a problem. Are you experiencing one when you exceed some limit?
    Scott

  • Spatial Query that uses Result of another Spatial Query

    Hi all,
    I am using the SDO_DIFFERENCE Operator to return the difference between a query window and an intersection geometry. This is fine and i get an object back that is cast to a STRUCT using the SDO API. I want then to use this (returned)object in another SQL query that uses the SDO_RELATE Operator. The problem is that i dont know what type it needs to be so that the SDO_RELATE operator will accept it as a valid argument. Has anyone done this before or seen anything like it? Any help will be very much appreciated.
    Keith.

    Thanks for your help,
    I have done the following steps, but i still dont understand why it doesnt work.
    CREATE TABLE val_results (sdo_rowid ROWID, result varchar2(1000));
    CALL SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT('SHAPES','SHAPE','VAL_RESULTS');
    SELECT * FROM val_results;
    1 null     Rows Processed <3>
    2 AAARDDAAEAAAAA+AAA     13348 [Element <1>] [Ring <1>]
    3 AAARDDAAEAAAAA+AAB     13367 [Element <1>] [Ring <1>]
    SELECT shape_id,SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(c.shape, 0.005)
    FROM shapes c;
    3     TRUE
    2     13348 [Element <1>] [Ring <1>]
    1     13367 [Element <1>] [Ring <1>]
    If my rectangle and polygon is still invalid, can someone tell me why they are invalid. And how can i make them valid?
    Thanks.
    UPDATE:
    I have solved Polygon issue.
    In Spatial Developer's Guide it says:
    Simple polygon whose vertices are connected by straight line
    segments. You must specify a point for each vertex; and the
    last point specified must be exactly the same point as the first
    (within the tolerance value), to close the polygon. For
    example, for a 4-sided polygon, specify 5 points, with point 5
    the same as point 1.
    I have added a point to polygon which is same as first point. Now, it can find the point in polygon.
    INSERT INTO shapes VALUES (4, 'Polygon', SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), SDO_ORDINATE_ARRAY(306,193,130,441,489,653,88,183,442,354,306,193)));
    But, when i run this query again:
    SELECT shape_id,SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(c.shape, 0.005) FROM shapes c;
    4     13349 [Element <1>] [Ring <1>][Edge <4>][Edge <1>]
    3     TRUE
    2     13348 [Element <1>] [Ring <1>]
    1     13367 [Element <1>] [Ring <1>]
    it doesn't say TRUE like it did for Circle ??
    Edited by: WhiteScars on Jan 4, 2010 12:45 AM

  • Interactive Reporting - Chg Query from Using Table to Result Set w/ same Co

    Currently I have a query that uses an Oracle table. I would like to change the query to use the result set of another query wh/ contains the same information & column names (however, since I am creating the results from scratch, I don't have to wait for the Oracle table to be updated). Is there a way to do this change w/o IR automatically removing the column names from the results and then making me go back into each result set and re-adding them, formatting them, etc. For example, the query currently uses a table called Defect_History, wh/ has columns bug_id, application, sub-app, etc. This table is not updated on a daily basis, so I have created a new query wh/ goes against the source tables used in creating the Defect_History table and puts the latest information into an IR result set. Is there a way to change the current queries that use the Defect_History table to use the IR result set instead w/o basically recreating each of the subsequent queries? I have gone into Dashboard Studio Optimize Utility, but the queries show as using Data Model, Data Model2, etc as the Parent and I am not able to make changes to it.
    Thanks.
    Terri

    I am in the Dashboard Studio - Optimize Utility. When I select that report (or any of the others), the Reparent button is grayed out on the toolbar. I've also tried right-clicking on the report and it's grayed out there as well. Any ideas?

Maybe you are looking for