Filter records on two different parameters

I have to filter records in a report based on parameter.Values for parameter are :
Open
Closed
Applicable
Not Applicable
if user chooses Applicable,all records should be selected except Not Applicable.I tried various oprions,but none is giving me required results.Any ideas?

This..?
QL> select * from status;
C1                                                                             
Open                                                                           
Closed                                                                         
Applicable                                                                     
Not Applicable                                                                 
SQL> select *
  2  from status
  3  where c1 ='&st'
  4  or ('&st' = 'Applicable' and c1 != 'Not Applicable');
Enter value for st: Applicable
old   3: where c1 ='&st'
new   3: where c1 ='Applicable'
Enter value for st: Applicable
old   4: or ('&st' = 'Applicable' and c1 != 'Not Applicable')
new   4: or ('Applicable' = 'Applicable' and c1 != 'Not Applicable')
C1                                                                             
Open                                                                           
Closed                                                                         
Applicable                                                                     
SQL> /
Enter value for st: Closed
old   3: where c1 ='&st'
new   3: where c1 ='Closed'
Enter value for st: Closed
old   4: or ('&st' = 'Applicable' and c1 != 'Not Applicable')
new   4: or ('Closed' = 'Applicable' and c1 != 'Not Applicable')
C1                                                                             
Closed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Insert same record on two different tables (no master detail)

    Hi all,
    I'd like to know how to insert 1 record into two different
    tables.
    the first table is corni_dati the second is cornidati_prev
    anytime someone inserts a new record both tables should be
    filled.
    if ((isset($HTTP_POST_VARS["MM_insert"])) &&
    ($HTTP_POST_VARS["MM_insert"] == "form1")) {
    $insertSQL = sprintf("INSERT INTO corni_dati (corni_id,
    disciplina,
    codice_modulo, insegnanti, classi, obiettivi, prerequisiti,
    ud1, ud2,
    ud3, ud4, ud5, ud6, metodologia, collegamenti, verifiche,
    verifiche_note, durata, periodo_inizio, periodo_fine, note,
    indirizzo,
    modnum, modulo_titolo, `data`, compilato, descrizione) VALUES
    (%s, %s,
    %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
    %s, %s, %s,
    %s, %s, %s, %s, %s, %s, %s)",
    GetSQLValueString($HTTP_POST_VARS['corni_id'],
    "int"),
    GetSQLValueString($HTTP_POST_VARS['disciplina'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['codice_modulo'], "text"),
    GetSQLValueString($HTTP_POST_VARS['insegnanti'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['classi'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['obiettivi'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['prerequisiti'], "text"),
    GetSQLValueString($HTTP_POST_VARS['ud1'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['ud2'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['ud3'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['ud4'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['ud5'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['ud6'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['metodologia'], "text"),
    GetSQLValueString($HTTP_POST_VARS['collegamenti'], "text"),
    GetSQLValueString($HTTP_POST_VARS['verifiche'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['verifiche_note'], "text"),
    GetSQLValueString($HTTP_POST_VARS['durata'],
    "int"),
    GetSQLValueString($HTTP_POST_VARS['periodo_inizio'], "text"),
    GetSQLValueString($HTTP_POST_VARS['periodo_fine'], "text"),
    GetSQLValueString($HTTP_POST_VARS['note'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['indirizzo'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['modnum'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['modulo_titolo'], "text"),
    GetSQLValueString($HTTP_POST_VARS['data'],
    "date"),
    GetSQLValueString($HTTP_POST_VARS['compilato'],
    "text"),
    GetSQLValueString($HTTP_POST_VARS['descrizione'], "text"));
    mysql_select_db($database_itiscorni, $itiscorni);
    $Result1 = mysql_query($insertSQL, $itiscorni) or
    die(mysql_error());
    $insertGoTo = "creacodice_doc.php";
    if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
    header(sprintf("Location: %s", $insertGoTo));

    If you are doing this then you really should have a look at
    your database
    design. Read up on the first 3 normal forms.
    Pat.
    "darrel" <[email protected]> wrote in message
    news:ee77jg$302$[email protected]..
    >
    >
    > --
    >> Hi all,
    >> I'd like to know how to insert 1 record into two
    different tables.
    >
    > In your SQL query, just use two inserts:
    >
    > INSERT into TABLE1...; INSERT into TABLE2...
    >
    > Darrel
    >

  • How to handle an update of the same record from two different user JSP

    how do you handle an update of the same record from two different users in JSP... if one person updates the record from one drop downs should be updated as well.. is the possible.

    I'm not sure whether I understand your question. If one user changes a record then you would like other users to see those changes. Normally those changes will be visible to other users when they refresh their browser, after the first user has committed changes to the record. I you want to be sure that the same row isn't updated at the same time by to different user, you need to configure some locking (pessimistic locking) - this depends of what technology you use. In EJB3 pessimistic locking is performed by adding a version to every entity object. If you are using ADF, the framework is able to handle either pessimistic or even optimistic locking.
    If you want the changed row to be updated in other users browsers without any user interaction by these users, you should take a look at Reverse Ajax (ex. DWR http://ajaxian.com/archives/reverse-ajax-with-dwr) - or Ajax in general. But you will never get a realtime solution, where changes is visible in other users browsers right after each record update.

  • How to handle an update of the same record from two different user  in JSP

    how to handle an update of the same record from two different user
    how do you handle an update of the same record from two different users in JSP... if one person updates the record from one drop downs should be updated as well.. is the possible.

    Usually, if two users try to update the same row at the same time, you want the first to commit to succeed, and when the second commits, they should fail with the error that the row was being concurrently updated. They you may want to show them the new row values and give them the opportunity to merge their values with the new row values...
    How can you achieve this? Google optimistic locking.

  • How to upload records  in two different interface tables through WebADI.

    We have created custom integrator with two different interfaces to insert records in AP_INVOICES_INTERFACES and AP_INVOICE_LINES_INTERFACE. Also defined the custom layout in which we mention the header and lines column info to be displayed in the spreadsheet. When I tried to create document to upload the records into the interface tables, could find two different interface for header and lines , when we select the header and upload records into the AP_INVOICES_INTERFACES table it was successfull. But couldn't upload records inserted in Lines interfaces tables. How do we upload records in both the table do we have constraint with Web ADI can insert records to only one interface tables. Any recommendation highly appreciated.

    Raghu,
    Thanks for the reply,
    I have a concern, But if you are connecting a another database you have to create one more subreport and each time am creating connections across databases we have to create subreport and go for the design to show the record. Is it any way to have a common field or union records approach in crystal report 2008.
    For Example :
    Approach 1 :
    Emp name           Emp salary      (Common Header)
    Variable Field1    Variable field2   ( Iterations to be done here for records)
    Variable field 1 contains ---> emptbl(employee name), b.emptbl(employee name) (A database, b database, c database or any .db)
    Variable field2  contains --->  emptbl (salary info between databases)
    Approach 2:
    getting all the records and union all the records 
    Thanks
    Murali Sri

  • Extracting unique records from two different tables record

    Hello,
    In the following code of two different tables www.testing.com exists in both tables. I want to compare two different columns of the two different tables to get unique records.
    SQL> select unique(videoLinks) from saVideos where sa_id=21;
    VIDEOLINKS
    www.testing.com
    SQL> ed
    Wrote file afiedt.buf
      1* select unique(picLinks) from saImages where sa_id=21
    SQL> /
    PICLINKS
    test
    test14
    www.hello.com
    www.testing.comThanks & best regards

    Unfortunatly you didn't mention the expected output. I guess it would be the one line
    "www.testing.com"
    in that case simply join the two tables.
    select *
    from saVideos v
    join saImages i on i.sa_id = v.sa_id and i.picLinks = v.videoLinks
    where v.sa_id=21;If needed then you could change the select list to retrieve only distinct values.
    select unique v.sa_id, v.videolinks
    from saVideos v
    join saImages i on i.sa_id = v.sa_id and i.picLinks = v.videoLinks
    where v.sa_id=21;I usually avoid distinct/unique whereever possible. This requires the database to do a sort and makes the query slow.
    Edited by: Sven W. on Feb 10, 2011 1:55 PM

  • Control two different parameters at the same time

    Two motors were connected each other rigidly. One motor controlled torque and the other motor controlled speed. I generated some torque and speed data which represented one cycle of motion from a motor simulation. I like to send these two different data sets (torque and speed) to two different motors at the same time. Torque data sends to one motor and speed data sends to the other motor to see the response of the load profile. In order to do this, I thought about using multithread, but I am not sure it will work for this application. Usually multithreading delay the CPU time so the overall control process might be delayed, right? If you have better idea, please let me know.

    If you are using one motion controller to control both motors, you will probably run into problems if you try to use multithreading on the PC. However, you can execute up to 10 programs (threads) at a time, in addition to host communication, using on-board programming. For more information on on-board programming please refer to the following tutorial: Developer Zone Tutorial: On-board Programming in FlexMotion
    Best wishes!
    Dawna P.
    Applications Engineer
    National Instruments

  • Peoplesoft Panels for one record on two different level

    There are two key fields on the record. I want to display only one key field as header and rest on the grid. Two key fields are
    New item (K) search key, list box
    Old item (K) search key, list box
    other fields...
    1. I have created a panel that is used for one new item that replaces bunch of old items(Item Supersedure) in which I used new item key in the header and old key item field in the grid. This works fine.
    2. But, I also want another panel that needs old item field in the header and bunch of new items in the grid for the same record(one old item being replaced by few new items).
    I made both old and new item field search key and list box, so that I can use them to create panel for these two situation.However, this second panel is not working right. Everytime I insert new items in the grid, it doesn't copy old item on the header that is associated with it on database after save.
    Since, this was not working, I was thinking of creating a view, work record etc but that doesn't seem to work either.
    Please share your expertise. Your help will be highly appreciated.
    Thanks

    There are two key fields on the record. I want to display only one key field as header and rest on the grid. Two key fields are
    New item (K) search key, list box
    Old item (K) search key, list box
    other fields...
    1. I have created a panel that is used for one new item that replaces bunch of old items(Item Supersedure) in which I used new item key in the header and old key item field in the grid. This works fine.
    2. But, I also want another panel that needs old item field in the header and bunch of new items in the grid for the same record(one old item being replaced by few new items).
    I made both old and new item field search key and list box, so that I can use them to create panel for these two situation.However, this second panel is not working right. Everytime I insert new items in the grid, it doesn't copy old item on the header that is associated with it on database after save.
    Since, this was not working, I was thinking of creating a view, work record etc but that doesn't seem to work either.
    Please share your expertise. Your help will be highly appreciated.
    Thanks

  • Machine records in two different directories - ok?

    I'm running an OD master that several hundred managed workstations are bound to. There are machine records for every workstation in the directory, for MCX purposes. I'm currently building another OD master from scratch on a different server that I will bind all workstations to in the winter. The clients do not receive LDAP from DHCP, I have the search paths manually specified.
    My question is this - if I add records ("accounts") for all of the managed workstations and set up all the managed preferences in the new directory, will the the workstations themselves be affected in any way, or will nothing happen until I unbind them from the old directory and bind them to the new one? I believe this (the latter) is how it should work, but I want to be certain before creating all the accounts in the new directory.
    My concern is that the new managed prefs on the new server will in some way take effect on the workstations even though they're still bound to the old server, or that there will be some sort of conflict. Any ideas?
    Thanks for any advice.

    Hmm. That is my understanding as well.
    Though one thing - you mention
    +"If there are computer records in both directory domains, whichever's listed first in the search policy should take precedence."+
    However, as I'm planning it, the clients will only have one directory domain in their search path at a time..the records will exist in the second directory domain, but the clients won't have this second domain put in their search path until I make the switch to the new directory in production, and at the same time also remove the first directory domain from the client's search path.
    I think this answers my question. Thank you.

  • Fetch records from two different dbs and show it in a single af table

    Hi,
       I have a requirement, such as say, there are two databases having their own employees table. I need to query them both and show them in the UI using the af table tag. Any idea how this can be achieved efficiently please ?
    regards,
    Vijai

    Hi,
    Always mention your JDev version. Are you going to make the resultant data as read-only? If yes, you can create a db link pointing to another schema, and then use union all to merge the data in the query of the VO.
    Ex:
    select col1, col2, col3 from table1
    union all
    select col1, col2, col3 from table2@db_link_pointing_to_diff_schema
    -Arun

  • How can I define same Price Conditions for two different Sales Deals ??

    I need to define for the same price condition, lets say ZPMP, two different values or condition records, for two different sales deals and the same valid dates
    For example, Sales deal 1, ZPMP equal to USD 15 and valid dates from 04/15/08 to 04/30/08.
    Another condition record for Sales deal 2, ZPMP equal to USD 20 and valid dates from 04/15/08 to 04/30/08
    How can I do this.
    Thanks in advance.

    While creating condition tables, you have the option to create different key combinations. So if you want the system to take different condition records for different sales deals, there has to be a point of differentiation between those 2 sales deals.
    This can be done in one of the following ways:
    by giving customer specific prices
    by giving material specific prices for a particular customer etc
    All this can be defined as different key combinations while creating the condition tables. For each key combination, you can specify different condition records, so that the system is able to pull prices according to the requirement.
    But if the sales deals are entirely similar (that is even the validity dates, delivery dates etc are also same), and there is no differentiating factor, then you will have to manually input the prices.
    Do get back if you require more clarification. Please reward points if useful.
    Regards,
    Swapna

  • How can I reference records outside the two date parameters?

    Hi all,
    I have a query that fetches records based on the two date parameters defined (Startdate and Enddate).
    If the Startdate is 2014-12-01 and the Enddate is 2014-12-12, I want to pull records outside these two date parameters, that is      2014-09-01 and 2014-11-30.
    I want to add up the records from  2014-09-01 and 2014-11-30 and include them in one of the columns in my report.
    I tried using this query:
     SUM(CASE WHEN FilteredIncident.Statuscodename IN ('QUEUED', 'ASSIGNED') AND (EnteredOn >= '2014-09-01' AND EnteredOn<= @StartDate) THEN 1 ELSE 0 END) AS OpenRecords
    Please help with any ideas..thanks

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you probably need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    There is no such crap as a “status_code_name” in RDBMS. It has to be a “<something in particular>_status”; think about how silly that data element name is! Want to keep going and have a “status_code_name_value_id”? LOL! 
    The name “Filtered_Incident” is also wrong. Tables are sets, so unless you have only one element in this set, the table name should be a plural or (better) collective name. But a better question is why  did you split out “Filtered_Incidents” from “Incidents”?
    Would you also split “Male_Personnel” and “Male_Personnel” from “Personnel”? 
    Get a book on data modeling and learn some basics. 
    >> I have a query that fetches records [sic: rows are nor records] based on the two date parameters defined (report_start_date and report_end_date). If the report_start_date is 2014-12-01 and the report_end_date is 2014-12-12, I want to pull records [sic]
    outside these two date parameters, that is 2014-09-01 and 2014-11-30. I want to add up the records [sic] from 2014-09-01 and 2014-11-30 and include them in one of the columns in my report. <<
    Having no DDL and no sample data makes this hard. Does your boss make you program without any documentation, DDL, etc? This spec is vague; you say to do a total, but show a count, etc. 
    One of the many nice things about DATE data types is that the BETWEEN predicate works with them, so you can quite writing 1960's BASIC predicates with primitive logic operators. 
    Here is a guess: 
    SELECT SUM(CASE WHEN incident_date BETWEEN '2014-09-01' 
               AND @report_start_date THEN 1 ELSE 0 END)
           AS open_record_cnt 
      FROM Incidents
     WHERE incident_status IN ('QUEUED', 'ASSIGNED')
        AND incident_date <= @report_end_date; 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Passing parameters between form portlets on two different pages ...

    Here is a brief summary of our problem.
    We have one master form and a detail form which are published as portlets and placed in two different pages.
    Now i want to pass parameters from master form portlet resides on one page to detail form portlet resides on another page.
    Say for example, when i invoke master form (created based on demo DEPT table), enter values on fields then invoke another page
    on which the second form portlet (say form based on EMP demo table) resides. Now i want to pass deptno to second form and
    get displayed in deptno field of second form.
    I was looking at the following posting, but how to do this when forms are published as portlets and placed on two different pages ?
    http://forums.oracle.com/forums/message.jsp?id=997683
    Customer actually want to pass a parameter from master form to 5 detail form portlets resides on different pages.
    This is bit urgent as it is the only problem stopping the customer go live.
    Thanks in advance.

    Please refer to post Re: session state security
    It tells you how to populate a form portlet in a page by clicking on a link in a report portlet.
    You can use the wwsto_api_session objects to store data submitted by the master and let the detail form pick it up and proceed with the query.

  • Filter Information for two parameters in Query Designer

    Hi Gurus !!
    I have a problem for filter information for two parameters in Query Designer,
    the first parameter correspond a Ejercise-Period, the second parameter correspond
    a Compensation Date of document, both parmeters must have date less than or equal to
    to the parameter date input for screen (mm.aaaa).
    Internally the Report must filter countable information for Countable Date <= Parameter Input and
    Compensation Date of document <= Parameter Input.
    If i assign two filter parameter in Query Designer, not could realise this.
    Exist any simple form to realise this ??
    Wait for yours responses.
    Thank You.

    Hi shanthi bhaskar,
    Thanks a lot for your answer.
    I have one doubt about it:  with this solution that you propoused the user will be able to select the values for plant?.
    I mean, the user make the selection of the value for Zone, then he wants to see the in plan´s variable the values that corresponds with this Zone for make a new selection of plan.
    What happens if I need this dependency also in another variable like time variable?
    Thanks  a lot

  • Two different colors for two different record in the same tab

    How can i have two different colors in a tab that return records; i would like to have a line in a color, the next in an other one in order to alternate the color of each record returned;
    This concern fields from a group in the data model
    Thanks
    null

    Hi
    similar issue is answered perviously here .. see it that helps
    bye
    sudhir

Maybe you are looking for

  • Cant write/edit data on my external hard disk! Help please!~~

    Okay guys, currently, i'm using Tiger version 10.4.11. My problem is that i cant edit data or write data to any external hard disks, like the maxtor One Touch and so on. Only thing i can do is to extract the data from the disks. I have tried to write

  • Adobe reader 9 - email (submit)  pdf issue

    I created a form that allows us to fill out time off requests and click submit button which attaches the pdf to an email which is sent to our secretary. She enters in the time off request and then clicks the same button to mail it back to a superviso

  • TS3212 is iTunes compatible with windows 7 ultra

    Is iTunes compatible with windows 7 ultra?

  • Query SQL and output to text file then loop through list to execute

    It seems there's no obvious way to do what I want to below as everyone has their own take on querying SQL server with Powershell! I need to use PowerShell to connect to ServerA and query a test database and select Name from it.  The Name results of t

  • No Posting object

    No posting object defined for company code, funds centre and commitment item.........pls let me know why this error occurs? Is it a configuration error or mapping problem? Is any mass upload possible, if so wat is the transaction code?