Need to run a query to select # of counts based on each month

Let's say I have a talble with 12 months, each month has some data.
I want to run a select count(*) to get result of how many rows per month, like Jan----100, Feb---90, etc.
How do I do that?
Thanks in advance.

user569151 wrote:
Let's say I have a talble with 12 months, each month has some data.
I want to run a select count(*) to get result of how many rows per month, like Jan----100, Feb---90, etc.
How do I do that?
Thanks in advance.May be like this:
SELECT EXTRACT(MONTH FROM date_column),COUNT(*)
FROM TABLE_NAME
GROUP BY EXTRACT(MONTH FROM date_column);

Similar Messages

  • Select the table based on 2 months ? Query no working

    I have a table TEST1 in schema MESSAGE_REPORT. What i want to do is select the table based on 2 months ( JULY and AUGUST ). The requirement is Whole JULY data should be there and for AUG the data should be till 01 aug . Below is the query i m using but its giving me error . Moreover the Where clause "TRUNC(HIRE,'MONTH') " part is compulsary to be used ,changes have to be made in the ">= timestamp '2010-07-01 00:00:00' and frd.sent_timestamp < timestamp '2010-08-10 00:00:00';" part only . please can anyone help me out
    NAME        HIRE
    SALE     01.07.2010 00:00:00,000000000
    cops     15.07.2010 00:00:00,000000000
    NAVEED     31.07.2010 00:00:00,000000000
    HEN     01.08.2010 00:00:00,000000000
    BEN     10.08.2010 00:00:00,000000000
    CROSS     15.08.2010 00:00:00,000000000
    select * from MESSAGE_REPORT.test1 where
    TRUNC(HIRE,'MONTH') >= timestamp '2010-07-01 00:00:00' and frd.sent_timestamp < timestamp '2010-08-10 00:00:00';
    ERROR:
    ORA-00904: "FRD"."SENT_TIMESTAMP": invalid identifier
    00904. 00000 -  "%s: invalid identifier"
    *Cause:   
    *Action:
    Error at Line: 24 Column: 60Edited by: user12633486 on Aug 11, 2010 1:13 PM
    Edited by: user12633486 on Aug 11, 2010 1:51 PM

    Thats becuase you are comparing with Month and not the complete date.
    Check this:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'SALE' col1,'01.07.2010 00:00:00' col2 from dual
      2  union all select 'cops','15.07.2010 00:00:00' from dual
      3  union all select 'NAVEED','31.07.2010 00:00:00' from dual
      4  union all select 'HEN','01.08.2010 00:00:00' from dual
      5  union all select 'BEN','10.08.2010 00:00:00' from dual
      6  union all select 'CROSS','15.08.2010 00:00:00' from dual)
      7  select * from t
      8  where
      9  TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') >= timestamp '2010-07-01 00:00:00'
    10* and TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') < timestamp '2010-08-10 00:00:00'
    SQL> /
    COL1   COL2
    SALE   01.07.2010 00:00:00
    cops   15.07.2010 00:00:00
    NAVEED 31.07.2010 00:00:00
    HEN    01.08.2010 00:00:00
    SQL>
    -- For less than equal to
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 'SALE' col1,'01.07.2010 00:00:00' col2 from dual
      2  union all select 'cops','15.07.2010 00:00:00' from dual
      3  union all select 'NAVEED','31.07.2010 00:00:00' from dual
      4  union all select 'HEN','01.08.2010 00:00:00' from dual
      5  union all select 'BEN','10.08.2010 00:00:00' from dual
      6  union all select 'CROSS','15.08.2010 00:00:00' from dual)
      7  select * from t
      8  where
      9  TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') >= timestamp '2010-07-01 00:00:00'
    10* and TO_DATE(col2,'DD.MM.RRRR HH24:MI:SS') <= timestamp '2010-08-10 00:00:00'  -- less than equal to includes data for 10th august as well
    SQL> /
    COL1   COL2
    SALE   01.07.2010 00:00:00
    cops   15.07.2010 00:00:00
    NAVEED 31.07.2010 00:00:00
    HEN    01.08.2010 00:00:00
    BEN    10.08.2010 00:00:00
    SQL> Edited by: AP on Aug 11, 2010 1:31 AM
    Edited by: AP on Aug 11, 2010 1:32 AM

  • MDX query - need to run different query (where clause) on mondays

    The below query works OK and uses the substitution variable CurrentWeek in the WHERE clause, but I have one shortcoming that I need your help for:
    The query works fine for all days but mondays. On Mondays I need the query to fetch numbers from last week (as opposed to current week) as the query returns null as the cubes have no data for current week on mondays. Hence I need to change the where clause to use substitution variable LastWeek, or in some other way run a different query on mondays. I have another substitution variable called WeekDay which I can use to test which day of the week it is, but I am not sure of the syntax I need to use to test for day of week and then have the query use different substitution variables as a result of this test.
    Please help.
    Henning Strand
    SELECT NON EMPTY {[Measures].[meas_sg]} ON COLUMNS,
    NON EMPTY {[Kunde],[Kunde].[KU01],[Kunde].[KU02],[Kunde].[KU03],[Kunde].[KU04]} ON ROWS
    FROM MIFS.MIFS
    WHERE ([Marked].[Dagligvare],[Tid].[&CurrentWeek])

    Or to go off of Sean's suggestion, programmatically change the value of the substitution variable, and leave the code alone.
    Other thoughts -- have a load process to a single cell (sorry, my BSO roots are showing, but the concept is the same, load a single number) and then do a boolean test off its value -- 0 = Monday, 1 = the rest of the week.
    Regards,
    Cameron Lackpour

  • Permissions needed to run tarantella query audit?

    Hi
    I'm trying to run the "tarantella query audit ..." command to check for log file entries, using the account I use for all sgd admin.
    I've never done this before, and I get the error "you do not have permission to run this script" - can't find anything in the admin guide relating to specific permissions for this option, what am I missing?
    Thanks
    mrtng

    I did a quick test in my environment and found the runbook worked fine when run normally, but threw an access denied error when using runbook tester (my account is admin also). Just reinforcing to me that runbook tester is not a very useful tool.
    To troubleshoot, I'd try a couple changes:
    Create a new runbook with only the Run Program activity in it, and hard code the robocopy command that worked in the command line in the Command field
    Shouldn't need to specify server name if running locally on runbook server
    Leave everything else in the activity at defaults (no run as account in Advanced, and use service account in Security)
    Make sure activity-specific published data logging is enabled for the runbook
    Temporarily
    enable trace logging for Orchestrator remoting service, policymodule, and runbook service
    Then check in and run, and see if it works or there is more info in the trace logs.
    Has this server been "hardened" with any nonstandard policies or configuration? If so would want to peel those off to eliminate some kind of lockdown as the issue.
    Runbook:
    Noah Stahl | Automys |
    Downloadable Microsoft automation examples and solutions

  • Need modify Running total query

    CREATE TABLE DET
    (DDT DATE,
    DNO NUMBER,
    DCODE VARCHAR2(6),
    DAMOUNT NUMBER,
    DINST NUMBER);
    INSERT INTO DET VALUES (TO_DATE('01012010','DD/MM/YYYY'),7,1946,19674.5,NULL);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),8,1574,4800,NULL);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),8,1574,50000,208.333);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),9,1835,31600,208.333);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),6,1924,50000,232.558);
    INSERT INTO DET VALUES (TO_DATE('02022010','DD/MM/YYYY'),9,1835,5000,NULL);
    INSERT INTO DET VALUES (TO_DATE('02022010','DD/MM/YYYY'),9,1835,31600,131.667);
    INSERT INTO DET VALUES (TO_DATE('05022010','DD/MM/YYYY'),8,1574,50000,208.333);
    INSERT INTO DET VALUES (TO_DATE('10022010','DD/MM/YYYY'),6,1924,50000,232.558);
    INSERT INTO DET VALUES (TO_DATE('01032010','DD/MM/YYYY'),8,1574,50000,208.333);
    INSERT INTO DET VALUES (TO_DATE('01032010','DD/MM/YYYY'),6,1924,50000,232.558);
    i have this query ;
    SCOTT@orcl>select ddt,
      2  dno,
      3  dcode,
      4  newdamount damount,
      5  dinst,
      6  newdamount-nvl(dinst,0) run_tot
      7  from(
      8  select ddt,
      9  dno,
    10  dcode,
    11  damount,
    12  dinst,
    13  decode(nvl(to_number(to_char(ddt,'MM'))-1,0),0,damount,
    14  damount-nvl(dinst,0)*(to_number(to_char(ddt,'MM'))-1)) newdamount
    15  from det
    16  order by ddt)
    17  where dcode = '1835'
    18  order by ddt,dno,damount,dinst nulls first;
    it returns this result;
    DDT               DNO DCODE     DAMOUNT      DINST    RUN_TOT
    08/01/2010          9 1835        31600    208.333  31391.667
    02/02/2010          9 1835         5000                  5000
    02/02/2010          9 1835    31468.333    131.667  31336.666
    The results last row should appear like this;
    02/02/2010          9 1835    31391.667    131.667  31260 DAMOUNT for the row 02/02/2010 (where DINST > 0 ) should be 31391.667,(closing RUN_TOT of january)
    and NOT 31468.333.
    The above query logic could be enitrely wrong, because the criteria laid assuming that the instalment remains same every month.
    Please someone who is well-verse with Lag or Sum ..Over analytic function, correct my code.
    TY.

    user613563 wrote:
    Your query entirely missed one row with DAMOUNT 5000.
    i expect the result to be;
    DDT               DNO DCODE     DAMOUNT      DINST    RUN_TOT
    08/01/2010          9 1835        31600    208.333  31391.667
    02/02/2010          9 1835         5000                  5000
    02/02/2010          9 1835    31391.667    131.667  31260
    Well, i for one am not following the logic here, but this will give you the results you've posted (why doesn't the row with damount = 5000 factor in to the 'running total' in any way shape or form?)
    select
      ddt, dno, dcode, damount, dinst, resolved
    from
      select
        ddt, dno, dcode, damount, dinst,
        case when lag(trunc(ddt, 'MM')) over (order by ddt asc) != trunc(ddt, 'MM')
        then
          lag(damount-dinst) over (order by ddt asc) - dinst
        else
          damount-dinst
        end as resolved
      from det
      where dcode = '1835'
      and dinst is not null
        union all
      select
        ddt, dno, dcode, damount, dinst,
        damount as resolved
      from det
      where dcode = '1835'
      and dinst is null
      order by ddt asc, dinst nulls first
    )Edited by: Tubby on Jan 11, 2010 2:47 PM
    fixed the not equals sign since the forum eats less than / greater than symbols

  • MS SQL database needs to run mdx query to analysis services to retrieve data from a BPC 10 Netweaver cube(view only)

    We are in the process of migrating from BPC7 SP12 Microsoft sql server to BPC10 netweaver on a sql server with BW7.4 and need to integrate our home grown data warehouse which is on a Microsoft sql server.  The data warehouse currently connects to BPC7 using integration services/analysis services and runs mdx queries to analysis services to retrieve data from the BPC7 cube (view only).  Please provide documentation on how to create this same integration with our data warehouse using BPC10 netweaver on a sql server.

    When you were setting up your ODBC data source for
    the Text driver, did you click on the "Options"
    button? There's a lot of options in there that I
    didn't understand at first glance.Yes I clicked on the options button, but the only thing there is dealing with file extensions. I left it set to the default.
    I have since tried closing my connection after I insert a record, I then try executeQuery, but still no luck. Seems strange that I can write to the file but not read from it. If any thing I'd expect the opposite problem.
    I have also tried using the class "JoltReport" from the sun tutorial instead of my own with the same result.
    Message was edited by:
    Hentay

  • Need Pay Run results Query in R12

    Hi Experts,
    Good morning to all.
    I have a requirement to display the fields like Payroll name,Payroll Period,element name and their values from pay run results.
    if anybody worked on this requirement please send me the select statement.
    Cheers
    Ram

    Does this help -
    select papf.employee_number,papf.full_name,ppa.effective_date,pp.payroll_name,
    pet.element_name,piv.name input_value,prrv.result_value
    from apps.pay_payroll_actions ppa, pay_assignment_actions paa,
    pay_payrolls_f pp,pay_run_results prr, pay_run_result_values prrv,
    pay_input_values_f piv,pay_element_types_f pet,
    apps.per_all_assignments_f paaf, apps.per_all_people_f papf
    where ppa.payroll_action_id = :payroll_action_id -- give your payroll_action_id
    and ppa.payroll_action_id = paa.payroll_action_id
    and ppa.payroll_id = pp.payroll_id
    and paa.assignment_action_id = prr.assignment_action_id
    and prr.run_result_id= prrv.run_result_id
    and prrv.input_value_id = piv.input_value_id
    and piv.element_type_id = pet.element_type_id
    and paaf.assignment_id = paa.assignment_id
    and paaf.person_id = papf.person_id
    and trunc(sysdate) between pp.effective_start_date and pp.effective_end_date
    and trunc(sysdate) between pet.effective_start_date and pet.effective_end_date
    and trunc(sysdate) between piv.effective_start_date and piv.effective_end_date
    and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date
    and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
    order by employee_number;

  • Can you run a Query in a Process Chain?

    As part of a data validation process chain, I need to run a query and send the results by email.  I've created the query (with the exception) and set it up in information broadcaster to be sent by email.  I thought that I would be able to just drop in the "Exception Reporting" process into the process chain and be able to select the query to run.  Needless to say, it don't work that way.
    If anyone has ran a query in a process chain, please let me know how you did it?
    Also if someone knows how the "Exception Reporting" process in RSPC works, please share?
    Thanks

    Patel, we may be able to rethink our approach and use the event data change that was mentioned in the document you sent.
    I was hoping to be able to do everything from within a process chain.  Does anyone know how to use the "Exception Reporting" process that is available in RSPC?  Is it a leftover from the 3.X days that can't really be used in 7.0?

  • How do you run a query to view duplicate records?

    I need to run a query with the query generator to produce a list of matching records. We have a problem whereby sales orders can come in by phone and email and therefore they sometimes get put on the system twice. I need to produce a query which picks up any orders where the CardCode and Document Value match, within say two days of each other.
    Please help?

    Hi Wendy Burt....
    Try This
    SELECT   COUNT(T0.[CardCode])as Duplicatecount, T0.[CardName], T0.[DocTotal] FROM ORDR T0
    WHERE T0.[DocTotal] IN ( select t1.doctotal from ORDR t1
    where t0.cardcode=t1.CardCode AND datediff(dd, t0.docdate,getdate())<=2)
    AND
    T0.CARDCODE IN ( select t1.CardCode from ORDR t1
    where t0.cardcode=t1.CardCode AND datediff(dd, t0.docdate,getdate())<=2)
    and t0.docstatus = 'O' and t0.doctotal >0
    GROUP BY  T0.[CardName], T0.[DocTotal]
    Regards,
    Kennedy

  • Need to Rewrite Distinct query...

    Hi All,
    Query A:
    SELECT count(DISTINCT FIELD_SERVICE_REP) CNT1
      FROM SOP_SERVICE_REQUEST_JOB ssrj, sop_service_request ssr
    WHERE TO_DATE('06/12/2006', 'mm/dd/yyyy') BETWEEN
           SSRJ.SCHEDULED_START_DATE AND SSRJ.SCHEDULED_END_DATE
           AND field_service_rep IS NOT NULL
           AND ssr.service_request_id = ssrj.service_request_id
    Result of Query A:-
    17 --> This is correct result
    Query B:
    SELECT FIELD_SERVICE_REP, count(FIELD_SERVICE_REP) CNT2
      FROM SOP_SERVICE_REQUEST_JOB ssrj, sop_service_request ssr
    WHERE TO_DATE('06/12/2006', 'mm/dd/yyyy') BETWEEN
           SSRJ.SCHEDULED_START_DATE AND SSRJ.SCHEDULED_END_DATE
           AND field_service_rep IS NOT NULL
           AND ssr.service_request_id = ssrj.service_request_id
           GROUP BY ssrj.field_service_rep
    Result of Query B:-
    FIELD_SERVICE_REP      CNT2
    1000036                  9
    105005937          1
    113001460          1
    113001757          3
    113002205          2
    113002476          4
    113003027          2
    113003166          1
    218012616          1
    218012630          1
    312003325          1
    500916804          1
    500935725          2
    501026039          6
    501154894          1
    501243382          3
    501248836          6I need to rewrite Query A in such a way that I get rid of DISTINCT as it is consuming a lot of time. I tried to group by in Query B and count but it is not giving same result as Query A (as expected..) so how can I rewrite Query A or Query B to get result of Query A (basically count unique field service reps.) as correct result is the one shown in Query A.
    Pls. note that original query is very large and it runs on set of dates and hence DISTINCT is taking too much time
    Thanks in advance to all for ur help..
    JP

    Some sample data:
    DROP TABLE SOP_SERVICE_REQUEST;
    CREATE TABLE SOP_SERVICE_REQUEST(service_request_id number(6,0));
    INSERT
    INTO SOP_SERVICE_REQUEST
    VALUES(100);
    INSERT
    INTO SOP_SERVICE_REQUEST
    VALUES(101);
    INSERT
    INTO SOP_SERVICE_REQUEST
    VALUES(102);
    INSERT
    INTO SOP_SERVICE_REQUEST
    VALUES(103);
    INSERT
    INTO SOP_SERVICE_REQUEST
    VALUES(104);
    DROP TABLE SOP_SERVICE_REQUEST_job;
    CREATE TABLE SOP_SERVICE_REQUEST_job(service_request_id number(6,0), SCHEDULED_START_DATE date,SCHEDULED_END_DATE date,field_service_rep number(6,0));
    INSERT
    INTO SOP_SERVICE_REQUEST_job
    VALUES(100, '10-jun-06', '16-jun-06', 200);
    INSERT
    INTO SOP_SERVICE_REQUEST_job
    VALUES(101, '10-jun-06', '16-jun-06', 201);
    INSERT
    INTO SOP_SERVICE_REQUEST_job
    VALUES(102, '10-jun-06', '16-jun-06', 201);
    INSERT
    INTO SOP_SERVICE_REQUEST_job
    VALUES(103, '10-jun-06', '16-jun-06', 202);
    INSERT
    INTO SOP_SERVICE_REQUEST_job
    VALUES(104, '10-jun-06', '16-jun-06', 201);
    select * from sop_service_request
    select * from sop_service_request_job
    prompt Query A:
    SELECT count(FIELD_SERVICE_REP) CNT1
    FROM SOP_SERVICE_REQUEST_JOB ssrj, sop_service_request ssr
    WHERE TO_DATE('06/12/2006', 'mm/dd/yyyy')
    BETWEEN SSRJ.SCHEDULED_START_DATE AND SSRJ.SCHEDULED_END_DATE
    AND field_service_rep IS NOT NULL
    AND ssr.service_request_id = ssrj.service_request_id;
    prompt Query B:
    SELECT FIELD_SERVICE_REP, count(FIELD_SERVICE_REP) CNT2
    FROM SOP_SERVICE_REQUEST_JOB ssrj, sop_service_request ssr
    WHERE TO_DATE('06/12/2006', 'mm/dd/yyyy')
    BETWEEN SSRJ.SCHEDULED_START_DATE AND SSRJ.SCHEDULED_END_DATE
    AND field_service_rep IS NOT NULL
    AND ssr.service_request_id = ssrj.service_request_id
    GROUP BY ssrj.field_service_rep;
    Output:
    DROP TABLE SOP_SERVICE_REQUEST succeeded.
    CREATE TABLE succeeded.
    1 rows inserted
    1 rows inserted
    1 rows inserted
    1 rows inserted
    DROP TABLE SOP_SERVICE_REQUEST_job succeeded.
    CREATE TABLE succeeded.
    1 rows inserted
    1 rows inserted
    1 rows inserted
    1 rows inserted
    Query A:
    CNT1
    4
    1 rows selected
    Query B:
    FIELD_SERVICE_REP CNT2
    201 2
    200 1
    202 1
    3 rows selected

  • InfoSet - Z tables need to be appeared on the selection criteria

    Hi ,
    My requirement is to have Z table fields in the selection criteria in an info set.
    Currently i have an info set which has only standard SAP fields for selection. I have couple of Z tables whose fields need to be included in the selection criteria. Based on the values selected, report has to be displayed. So i believe some code has to be added for it.
    Can you please tell me how to add Z Fields in the query.
    Thanks,
    Sarika.

    Hi Sarika,
    Again refer to the above link http://shafiq.us/sap/index.php?option=com_content&view=article&id=54:adhoc-query&catid=41:adhocquery&Itemid=61
    Then go to heading "Ad-hoc Queries (Tcode: SQ01)"
    Then see Step 6-b, this is where you specify which field will be displayed on selection screen. Follow the steps and I am sure you will be able to complete your requirement.

  • Query to find data of each month

    hi,
    i have 2 table.
    1) Order_tb
    Name Null? Type
    ORDERID NOT NULL NUMBER
    CUSTOMERID NUMBER
    ORDERDATE DATE
    2) Order_d
    Name Null? Type
    ORDERID NUMBER
    PRODUCTID NOT NULL NUMBER
    PRODUCTNAME VARCHAR2(20)
    SELLINGPRICE NUMBER
    i need to find the total find the total selling price for each month in the year 2012 (orderdate).
    i have tried using join, but i could not take the data of 2012 particularly. Please help me on this issue.
    thank you
    Edited by: RSD on Feb 28, 2013 9:18 AM

    Hi,
    RSD wrote:
    ... i have tried using join, but i could not take the data of 2012 particularly. Please help me on this issue.The WHERE clause below is what limits the results to 2012.
    SELECT       TRUNC (t.orderdate, 'MONTH')     AS month
    ,       SUM (d.sellingprice)          AS total_sellingprice
    FROM       order_tb  t
    JOIN       order_d   d  ON  d.orderid  = t.orderid
    WHERE       t.orderdate  >= DATE '2012-01-01'
    AND       t.orderdate  <  DATE '2013-01-01'
    GROUP BY  TRUNC (t.orderdate, 'MONTH')
    ORDER BY  TRUNC (t.orderdate, 'MONTH')
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Simplify the problem. For example, pretend you're only interested in the first 3 or 4 months of 2012; we'll find a solution tht can easily be adapted for 12 (or any other number) of motnhs.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Query runs forever when using selection on line item dim

    we have a cube zcube which has po number as a line item dimension .
    everymonth users run queries this cube using po number as selection
    criterai and using a wild card search on this field . every time
    queries have run fine . however , this month when we try to do so
    the query runs forever and no results are returned . i also tried
    listcubing with similar selection but it also did not return any results .
    our production system has lot of data . i tried in test system it worked fine
    i checked the cube for compression and indices in production , they look fine
    can anyone think of anything that could have gone wrong ? also did rsrv tests ..
    but all come green
    we have not done any developments on this cube , however we have shifted to
    a new hardware in the past month . can anyone think of any reasons ?
    anything that can help me catch the issue ? all suggestions welcome

    Not sure,
    Are you saying that you need both the counts seperately? or a combined count?
    how are you joining alpha and beta tables? what is the join condition?
    you need to do something like this,
    SELECT COUNT(CASE WHEN
                        (A.col1 = 'Pete' AND SUBSTR(A.col2,,1,12)=SUBSTR(B.col2,,1,13))
                     OR ( A.col1 != 'Pete' AND SUBSTR(A.col2,,1,15)=SUBSTR(B.col2,,1,15))
                    THEN 1 ELSE 0
                 END)
    FROM alpha A, beta b
    WHERE alpha.join_cloumn= beta.join_columnG.

  • 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

  • Need of SQL query in selecting distinct values from two tables

    hi,
    I need a query for selecting distinct values from two tables with one condition.
    for eg:
    there are two tables a & b.
    in table a there are values like age,sex,name,empno and in table b valuses are such as age,salary,DOJ,empno.
    here what i need is with the help of empno as unique field,i need to select distinct values from two tables (ie) except age.
    can anybody please help me.
    Thanks in advance,
    Ratheesh

    Not sure what you mean either, but perhaps this will start a dialog:
    SELECT DISTINCT a.empno,
                    a.name,
                    a.sex,
                    b.salary,
                    b.doj
    FROM    a,
            b
    WHERE   a.empno = b.empno;Greg

Maybe you are looking for

  • Session-timeout is happening intermittently for few users in weblogic.

    Hi, We have a war file deployed on a cluster. And from the past 3 days, few users are reporting that the session is getting timed out within 30 mins. Actually the session timeout is set for 240 mins(4 hrs), this is defined in the web.xml file. And th

  • Spry collapsible panel stays open in Internet Explorer.

    I'm trying to use the spry collapsible panel to hide and show inormation, and it will not stay closed.  I've used the default closed option in the properties panel, and made sure the eye in design view is closed.  Please give some suggestions for cor

  • Do i have to charge my ipad overnight

    do i have to keep my ipad on charge overnight

  • Why is the PST Capture Tools so blasted slow?

    The only thing I can find from my testing is that the office 365 / exchange online servers cap your upload or they need a better pipe. My network resources are not even close to being exhausted nor are my systems yet it is taking a ridiculous amount

  • Import and default values for columns

    Hi guys I have a table in which there are default values for some columns. I take export of this table. I go to another database where this table structure is already there (but default values are not set). I run the import of table with ignore=Y. It