Need checkbox onclick somehow to run SQL query

Hello all,
Now, I know directly I cannot do this with a javascript function.  What I need to do is with a checkbox onclick
set a hidden field to the type of the data that is selected by the checkbox.  So, if I select the name of a person,
the onclick method needs to let the hidden field know we have a "person" entity type. I need this type because
when I do my true submit, that form field when read will denote what next page I need to bring up in a new tab.
The question I have is ok, I can attempt to do this a couple of ways, following:
1)  Come up with an AJAX call that will run a function on the server.  What I do worry about is
submitting the page and ending up losing boxes that were checked.  I also don't want a long
form submittal after every click.
OR
2)  Forget the onclick method, create a blank .cfm form, then use that form to run the query for the
types of data, and then call the page to be displayed?  Again, I'm new, so I don't know if this could
be weird in how the page comes up for display?
Thanks in advance!!!!!

Hey Dan,
Yep, I'm very new at using CF, so I pretty much stink at it compared to you all.  However, I fixed my one problem in that I don't need
to do anything with SQL queries with onclick.  I combined a bunch of forms into one and process stuff on that page.  Matter of fact,
I needed to do that.
However, what I do have a problem with is one last part of my keeping checkbox values when paging.  I can do almost everything,
meaning, keep track of checkbox values when checked by having a list of those values in session.  I can check the boxes when
I go back to the page with a simple <CFIF> block when the checkboxes are created for the page.
The issue I have now is how I can delete a value from the session list when a checkbox is unchecked.  I don't know if I should
keep track of the exact page number, or whatnot.  All I have now is a list of node ids.
Any ideas?
Thanks,
Ed

Similar Messages

  • Help needed in Exporting tables data through SQL query

    Hi All,
    I need to write a shell script(ksh) to take some of the tables data backup.
    The tables list is not static, and those are selecting through dynamic sql
    query.
    Can any body tell help me how to write the export command to export tables
    which are selected dynamically through SQL query.
    I tried like this
    exp ------ tables = query \" select empno from emp where ename\= \'SSS\' \"
    but its throws the following error
    EXP-00035: QUERY parameter valid only for table mode exports
    Thanks in advance,

    Hi,
    You can dynamically generate parameter file for export utility using shell script. This export parameter file can contain any table list you want every time. Then simply run the command
    $ exp parfile=myfile.txt

  • Problem in running sql query

    Hello ,
    I am using oracle 10g apex 3.2.
    I have assosiated 2 schema "vpmys and vp" with one workspace.
    In the application , i created a new page of report ,which is assosiated with one schema called "vp" and i wish to run this query
    select * from vpmys.t_devotees
    minus
    select * from vp.t_devotees
    Same database dmp is installed in both schema except that the no of rows may be more or less in one database.So first i need to know the added rows and what are they and then insert the same no of rows into another db.
    But this doesnt run in the application.
    But it runs in the SQL Command window.
    So what way i should change the query so that it runs.
    Thanks
    Swapna

    Post your question in Application Express Forum
    Oracle Application Express (APEX)

  • In need of a UCCE 7.5 SQL Query

    Would anyone happen to know of a SQL query that that can be run on the HDS what would give the avarage skillgroups assigned to an agent.  Also, another one that would give average number of agents to a supervisor? 

    Hi,
    try
    SELECT COUNT(*)/CAST(COUNT(DISTINCT sgm.AgentSkillTargetID) AS FLOAT) FROM Skill_Group_Member sgm
    and
    SELECT COUNT(*)/CAST((SELECT COUNT(DISTINCT SupervisorSkillTargetID) FROM Agent_Team_Supervisor) AS FLOAT) FROM Agent_Team_Member
    But please remember agents don't have to be in teams, so the above query does not count with agents who aren't assigned to a team.
    G.

  • How to run sql query in bat file in task schedular at every 10 seconds

    This is my sql script :
    DECLARE @countRows INT,
    @currDate DATE,
    @checkForTasks INT,
    @created_by_id INT,
    @gst_ID int;
    SET @currDate = Getdate()
    SET @countRows = (SELECT Count(*)
    FROM [dbo].[sd_gst_effective_table]
    WHERE isapplied = 0)
    IF @countRows > 0
    -- Check for those GST''s who are not applied yet : if they are greater than 0 then perform next task
    BEGIN
    SET @checkForTasks = (SELECT Count(*)
    -- Check is current date equals to task date or not
    FROM [dbo].[sd_gst_effective_table]
    WHERE effect_date = @currDate AND isapplied = 0)
    IF @checkForTasks > 0
    -- If current date = task date then perform this task
    BEGIN
    SET @created_by_id = (SELECT TOP 1 createdby FROM [dbo].[sd_gst_effective_table] WHERE effect_date = @currDate AND isapplied = 0)
    SET @gst_ID = (SELECT gst_id FROM [dbo].[sd_gst_effective_table] WHERE effect_date = @currDate AND isapplied = 0)
    -- STEP 1 :: InActivate the existing GST according to createdbyID
    UPDATE sd_gst_rate
    SET isactive = 0,
    inactivedate = Getdate()
    WHERE isactive = 1
    AND createdby = @created_by_id
    -- STEP 2 :: Activate the New GST according to implementation date and gstID
    UPDATE sd_gst_rate
    SET isactive = 1,
    activedate = Getdate()
    WHERE id = @gst_ID
    -- STEP 3 :: Inactivate the applied GST from sd_gst_effective_table
    UPDATE [dbo].[sd_gst_effective_table] SET isApplied = 1 WHERE gst_id = @gst_ID
    END
    END
    DECLARE @Text AS VARCHAR(100)
    DECLARE @Cmd AS VARCHAR(100)
    DECLARE @value nvarchar(1000);
    SET @value = (SELECT CONVERT(TIME,GETDATE()) AS HourMinuteSeconds);
    SET @Text = 'File Writed ' + @value
    SET @Cmd ='echo ' + @Text + ' > E:\AppTextFile.txt'
    EXECUTE Master.dbo.xp_CmdShell @Cmd
    This is resided in videos folder of windows , i have created a task schedular in windows 8.1 to run daily at every 10 seconds , but it is not working ... Please tell me how to deal with it.
    Please note : This sql query is running perfectly in sql server. Query have no errors. Please check whats wrong with my time schedular. I just want my schedular to run every 10 seconds regardless of date.

    Hi Emad,
    Is your script in a ".sql" file? May I know how you configure the schedule task action?
    Since you didn't mention how you configure the schedule task, can you confirm you have followed the below step correctly?
    Save your script in a ".sql" file.
    Create a ".bat" file and call the sql file above inside with
    sqlcmd.exe, you can reference
    here.
    Configure a schedule task to run the ".bat" file in a certain interval.
    Have you tried to run the script in you bat file in a standalone commandline window? Please post the script in your bat file, It can help to diagnose the issue.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Oracle 8i giving slow response when running sql query

    hi ,
    i am using oracle 8i server ;
    and sql query giving slow response before some days;
    so which parameter need to increase
    DB_BLOCK_BFFERS OR SHARE_POOL_SIZE
    CURRENT SETING IS
    DB_BLOCK_BUFFER=256000;
    SHARE POOLSIZE=300M;
    pls advice to me
    thanks

    No parameters need to be increased. Tuning is not done but making arbitrary changes to values and hoping that good things will happen by accident.
    The thing you really should be worrying about is your antique database and likely its impact on your skill set unless you are one year away from retirement.
    Where's the actual version number?
    Where's the DDL?
    Where's the DML?
    Where's the Explain Plan?

  • Long running sql query

    All,
    I'm new for sql query tuning. My select sql query is running more than 5-6 hours to complete and it is using bind variable. I'm using OEM to monitor the query. I can see stats are upto date and no blocking sessions and no object locks in db level. Can anyone guide me where I have to look and what should be done to increase the performance?
    Thanks.

    Read FAQ: {message:id=9360003}
    And {message:id=9360002}

  • Help me Please ..... How to Run SQL Query in Creator

    Hi all , I want to Run a SQL query in Creator how do i do it.
    If i want to retrive a set of records based on few matching fields or some join conditions , what method i can use ?
    How Can i run other SQL statements like ALTER , UPDATE , DROP ....
    Please Help me .

    Hi Hanumesh,
    To run SQL commands like ALTER, UPDATE, DROP you will have to go to the Pointbase console. Creator does not provide for database operations on the tables other than querying for data. To start the Pointbase console run startconsole.exe which can be found in <install directory>\SunAppServer8\pointbase\tools\serveroption.
    Hope this helps
    Cheers
    Girish

  • Running sql query across multiple (remote) databases

    I'd like to run a query that pulls information from multiple databases which are not on the same machine. Is this possible using SQL Developer?

    If you are still interested, there is a tool that can query multiple databases and save results in a single text file that you can then modify as necessary - see www.bsutils.com/MuSQL.html

  • Can we run SQL query on a XML file?

    Hi All
    I have an XML document which stores data of a table.
    My requirement is to retreive data from this XML document by firing SQL
    query.
    i.e "SELECT * FROM EMP" should give me the data from the EMP.XML file
    whose name is the table name.
    Does Oracle provide this feature to retreive data from an XML document
    by issuing the same SQL statement that is used in Database?
    Any pointer for this requirement is highly appreciated.
    Thanks in advance..
    Ashish

    select '<EMPLOYEE><EPNUM>' || EPNUM || '</EPNUM><EMPNAME>' || EMPNAME || '</EMPNAME></EMPLOYEE>' from EMPLOYEE;

  • Run sql query on a different thread

    Hello,
    I have a swing app that queries an MS SQL database and it works fine and everything happens in the same thread. However for improved performance and to avoid freeze ups, I want the SQL queries themselves to execute on a different thread as a different class, other than the swing app class. The query results (Result Set) I want them back to my swing app so I can present them on a JTable.
    Here is an example of what I am trying to accomplish:
    - Press button in my swing app.
    - Call class that implements Runnable
    - In the Run method of the new class do the following (this code will execute in a new thread):
    url = "jdbc:sqlserver://ServerName:1433;databaseName=Database;user=UserName;password=password";
    try{
         Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
         Connection con = DriverManager.getConnection(url);
         Statement stmt;
         ResultSet rs;
         stmt = con.createStatement();
         String queryString = "select * from databaseName";
         rs = stmt.executeQuery(queryString);
          con.close();
    catch(Exception em){
          em.printStackTrace();
         JOptionPane.showMessageDialog(null,em.toString());
    }- Get the ResultSet rs back from the class
    - Work with the results back in my swing app and present them in the JTable
    while(rs.next()){
                //do some stuff
         }Any help or hints are greatly appreciated.
    Thanks,
    Chris

    Two suggestions:
    -- Take a look at SwingWorker for taking care of the threading issues
    -- Keep all database handling code together. Collect the records into a Collection -- most likely ArrayList -- and return that. This way you can close the Connection and RecordSet within the same method that opens them.
    Just my 0.02.
    db

  • I need to covert the following MS SQL query to Oracle.

    The query is as follows..
    SELECT B.AL_DESCRIPTION,Count(C.TC_STATUS)
    FROM ALL_LISTS A, ALL_LISTS B, TESTCYCL C
    Where B.AL_FATHER_ID = A.AL_ITEM_ID
    And C.TC_STATUS = B.AL_DESCRIPTION
    And A.AL_DESCRIPTION = 'Status'
    And (C.TC_EXEC_DATE = @ExecutionDate@
    Or C.TC_STATUS = 'No Run')
    Group By B.AL_DESCRIPTION
    Union
    SELECT B.AL_DESCRIPTION,0
    FROM ALL_LISTS A, ALL_LISTS B
    Where B.AL_FATHER_ID = A.AL_ITEM_ID
    And A.AL_DESCRIPTION = 'Status'
    And Not Exists (Select 1 From TESTCYCL C Where C.TC_STATUS = B.AL_DESCRIPTION)
    Order By 1

    Is
    What does this below mean in MySql
    And (C.TC_EXEC_DATE = @ExecutionDate@Is ExecutionDate a variable name?
    Then replace it by..
    And (C.TC_EXEC_DATE = TO_DATE(ExecutionDate,'DD-MON-YYYY')If ExecutionDate is not a date datatype
    I guess you are trying to compare the value of TC_EXEC_DATE with some variable value.
    If you are using bind variable then you can substitute as
    And (C.TC_EXEC_DATE = TO_DATE(&ExecutionDate,'DD-MON-YYYY')check this,
    Here I am taking value at run time.
    SQL> select  empno,ename,hiredate
      2  from emp
      3   where hiredate > &dt;
    Enter value for dt: '22-MAY-1981'
    old   3:  where hiredate > &dt
    new   3:  where hiredate > '22-MAY-1981'
         EMPNO ENAME      HIREDATE
          7654 MARTIN     28-SEP-81
          7782 CLARK      09-JUN-81
          7788 SCOTT      19-APR-87
          7839 KING       17-NOV-81
          7844 TURNER     08-SEP-81
          7876 ADAMS      23-MAY-87
          7900 JAMES      03-DEC-81
          7902 FORD       03-DEC-81
          7934 MILLER     23-JAN-82
    9 rows selected.
    Using a variable
    SQL> declare
      2  eno number;
      3  name varchar2(50);
      4  edate date;
      5  dt date :='23-JAN-1982';
      6  begin
      7  select empno,ename,hiredate into eno,name,edate
      8  from emp where hiredate = dt;
      9  dbms_output.put_line(Eno||' '||name||' '||edate);
    10  end;
    11  /
    7934 MILLER 23-JAN-82
    PL/SQL procedure successfully completed.Twinkle

  • Need help in UPDATE data in SQL Query

    Hi all,
    I am trying to update data in the sql table as per below screenshot but couldn't able to do it. Can anyone help to update the data as I mention in screenshot.Appreciate you help.Thanks.
    Yellow highlighted columns are source
    Green highlighted columns are target
    Colored data should be update as per source data in sql table.Data is not static as it might have more rows to update and query should be bit dynamic.
    Maruthi...

    You have already asked this question once. You did not get any good answers, because you the information you gave was insufficient. And I'm afraid that the information is still in sufficient.
    Or more exactly, from the example you have given, the answer is: can't be done. And the reason it can't be done, is as I explained in response to you first thread: there is no information in the data to from which we can deduce that Clorox Company
    should be under "Week 1-1,K.B,F". The fact that rows are listed in a certain order in the screenshoot is of no importance, because a table is an unordered object.
    But you said in another post that you have a timestamp column. Maybe that column is usable - maybe it is not. But at least it is a key that you have more columns that the ones you show.
    The best way to get help with this type of problems is to post:
    1) CREATE TABLE statement for your table(s).
    2) INSERT statements with sample data.
    3) The desired result given the sample.
    4) A short description of the actual buisness problem you are trying to solve.
    5) Which version of SQL Server you are using.
    This makes it easy to copy and paste into a query window to develop a tested solution. Screenshots with an insufficient amount of data is not going to help you very much.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Need help with an XML-based SQL query

    Hello, everyone:
    I get 'no rows selected' from the following queries:
    SELECT extractValue((p.entity_types_xml), '/entities/test[a=fagioli]')
    FROM entity_types p
    WHERE
    existsNode(p.entity_types_xml,
    '/entities/test/text()') = 1;
    SELECT extractValue((p.entity_types_xml), '/entities/test/text()')
    FROM entity_types p
    WHERE
    existsNode(p.entity_types_xml, '/entities/test/text()') = 1;
    SELECT
    extractValue(p.entity_types_xml,'/entities/ARFinance-elem/entity-type')
    FROM entity_types p
    WHERE
    existsNode(p.entity_types_xml,'/entities/ARFinance-elem/ARFinanceTBD/text()') = 1;
    where the entity_types table looks like this:
    SQL> desc entity_Types;
    Name Null? Type
    ENTITY_TYPES_ID NOT NULL VARCHAR2(36)
    ENTITY_TYPES_XML NOT NULL XMLTYPE
    CLIENT_ID VARCHAR2(30)
    and the XML fragment looks like this:
    +++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" encoding="UTF-8"?>
    <entities
    xmlns="http://www.thirdpillar.com/xml/namespace/aom/entity"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.thirdpillar.com/xml/namespace/aom/entity ../generated/denormalized-schema.0.xsd">
    <test a="fagioli">pasta</test>
    <ARFinance-elem>
    <uid b="pasta">123</uid>
    <entity-type><![CDATA[ARFinance]]></entity-type>
    <ARFinanceTBD>tobedetermined</ARFinanceTBD>
    </ARFinance-elem>
    ++++++++++++++++++++++++++++++++++++++++++++
    As you can see, there is data in /entities/test[@a] as well as /entities/test/text(),
    so why aren't any of the queries returning the preceding XML fragment? Suggestions welcome and appreciated....
    Regards,
    Oswald
    ps: I'm sure I've overlooked something simple.

    Oswald,
    I think you need to add the namespace
    select extractValue(.....','xmlns:xsi="http://www.thirdpillar.com/xml/namespace/aom/entity"')
    from entity_types p

  • Run sql query through batch file

    how to create a batch file so that on running the batch file,
    I should get into the database using username and password and create the table and insert values inside that table

    kindly, if you are using windows you can create 2 files as following:
    a.bat
    b.sql
    put the files under spacific folder for example d:\bat folder
    -first file a.bat will contain the following:
    sqlplus apps/apps@yourdb @d:\bat\B.sql
    exit
    -second file b.sql will contain any sql statments you want as following:
    create table a (a1 number, a2 varchar2(100))
    insert into a (a1,a2) values(1,'Test')
    commit
    exit;
    hope this help you
    Regards ...
    Edited by: shedo76 on 28/04/2012 03:14 ص

Maybe you are looking for

  • Specifications for the report regarding the invoiced quantity.

    Hi all SAP gurus, I want to give specifications to the abaper regarding the layout of a report. The details are sales order, materials in it, order quantity, invoiced qty, balance qty and stock against the balance qty. I want to know the table & fiel

  • How to center title text and table across two columns

    Hello, I want to be able to center a table and its title across a two column page. The pages where I want to do this contain text in both columns or text in the left column and graphics in the right. On the same pages as the text and graphics, I'd li

  • How can I update Java on my Mac?

    How do I update Java on Mac OSX 10? Firefox is telling me my Java plug-in's vulnerable and requires an update but I don't know how to do this on the Mac. It says I need to uninstall Java first - how do I do this??

  • Adding custom column to a  user matrix

    Hi all I have a little problem When i create my matrix i add columns according to how many ship to's i have from there if i have 3 ship to's three columns are created with the shipto Name as the title. My problem is The ship to itself length is > 10

  • Incomplete Oracle BI Server Suite configuration

    Hi, experts, I have only installed the adminitration tool on a PC. on that PC, I grant the whole folder including the files to Power Users (a local user group). That I use one user in that group to login. I run the administration tool. I see this mes