Filter in a query

I have a query in a calendar item where i'm using a filter. This is filtered by a select list item that submit the page. The thing is when the select list item is null, obviously the calendar item will be empty... But I don't want that, I want to show all the values without any filter... for example as the query would not have the where condition.
Thanks in advance
Regards, Bernardo

This is being made a whole lot more complicated than it needs to be:
  WHERE NVL(:P36_PROTOCOL, PROTOCOL) = PROTOCOLEdit: Mind you -- this won't work if you have your select list has a value in the 'Null Return Value' field. At that point you'd either need to remove the value or use something like:
  WHERE DECODE(:P36_PROTOCOL, '[value from Null Return Value]', PROTOCOL, :P36_PROTOCOL) = PROTOCOLEdited by: matthew_morris on Nov 15, 2012 3:00 PM

Similar Messages

  • How do I use the Parameters from URL to filter on Content Query in ItemStyle.xsl?

    Hi, I might need your help with code that Content Query under <xsl:Template...> that I need a filter for 3 parameter from url (from date, to date(for date range) and type.
    eg: www.mywebsite.com/pages/Filter.aspx?DateFrom=01/01/2012&DateTo=01/01/2013&Type=sports
    I've google for help and not sure they seem working so far.

    Hi,
    If you want to filter a Content Query Web Part with the parameters from URL, we can achieve it with OOTB of Content Query Web Part by adding "Additional Filters" in "Web Part Properties"->"Query". We can add
    three filters like:
    date is greater than [PageQueryString:DateFrom]
    And
    date is less than [PageQueryString:DateTo]
    And
    type is equal to [PageQueryString:Type]
    Then redirect to the URL: www.mywebsite.com/pages/Filter.aspx?DateFrom=01/01/2012&DateTo=01/01/2013&Type=sports, the query results will be filtered.
    Please reply freely if I misunderstand your meaning or there any other questions.
    best regards
    Patrick Liang
    TechNet Community Support

  • How to Create Filter by date Query for access using Data base connectivity tool

    Hello,
    I had started my project by reading Access datas, by using an UDL connection,
    but now i want to create an access filter using a query that would permit to select two dates, and to obtain all corresponding datas, how to do it using the Parmetrized SQL query?
    Best regards,
    Remark: i dont know the SQL language
    ~~~~~~~~~~~~~~~~~~Looking for a LABVIEW JOB (In EUROPE)>~~~~~~~~~~~~~~~~~~
    **The Best Way To Predict**The**Future Is To Invent It**
    Solved!
    Go to Solution.

    Hi mike,
    I want to thank you for your help, i really appreciate it,
    i tried to make the code as ur picture, i had no problem to execute it, but i have no data's in the output
    i changed the date format, because i suppose that its a short date format in the database.
    can you just look at it, and tell me if you can find the problem,
    thank you again for your help
    Best regards,
    ~~~~~~~~~~~~~~~~~~Looking for a LABVIEW JOB (In EUROPE)>~~~~~~~~~~~~~~~~~~
    **The Best Way To Predict**The**Future Is To Invent It**
    Attachments:
    db.JPG ‏126 KB
    lav.JPG ‏82 KB

  • Another BW question about filter in the query definition

    Hi ,
    I have another question about filter in the query definition.
    <u>Question:</u>
    Which of the following objects can be filtered in the query definition?
    A. characteristic
    B. Key figure
    C. Structure
    D. Units
    E. Hierarchy
    My answer is A,B,D,E.
    The answer in the book is A,B,D
    Can anybody tell me which one is wrong?
    Thanks in advance,
    Liu Jia

    HI
    1.The answer could be A,B,D.you can not apply filters on hierarchies
    2.Whenever there is a change in Attribute data(like Location,Num etc...)that has to be reflected in all aggregates of the cube.Thsi can be done by running "ATTRIBUTE CHANGE RUN".
    sri

  • Unable to select the filter value after query execution

    hi,
    I am unable to drill down my keyfigures.
    1.i have a lC and GC values out of which GC is hidden so after the query execution i would like to filter my value between GC and LC but i do get only LC value in the filter and i do not get GC value to select .
    Could any one tell me how this can be done.this is very urgent.
    Thx
    Subha

    resolved on my own,so i am closing this.
    Thx
    Subha

  • Using a Search Filter in a Query

    Hello,
    Version 4.1.1.00.23
    I have Tabbed Form with a query that I want to set up a filter on.
    The table has 5 columns that the user can select from the filter. All five columns contains a status id for that particular column.  The columns are OVERALL_STATUS, SCOPE, SCHEDULE, RESOURCES, and EXTERNAL_READINESS.  The values in these columns can be R, Y, or G to represent RED, YELLOW, or GREEN.
    The requirement is to return the rows that only have a 'G' (Green) for the respective column.
    The LOV for the filter contains a STATIC list to represent the columns from this table.
    STATIC2:Overall Status;OVERALL_STATUS, Scope;SCOPE, Schedule;SCHEDULE, Resources;RESOURCES, External Readiness;EXTERNAL_READNESS
    The query looks similar to this:
    [code]
    SELECT <column list>
    FROM table
    WHERE : Pxx_SEARCH = 'G';  (NOTE: I put a space between the colon and the Pxx because the window thought I tryng to make a smiley face)
    [code]
    This does not return any rows. I thought that when the query was resolved the substitution would be done, but I think that APEX it putting single quotes around the value. i.e. WHERE 'OVERALL_STATUS' = 'G'.
    Can someone help how to fix this?
    Please let me know if I'm not clear.
    Thanks,
    Joe

    The  :PxxSEARCH isn't a substitution but a value.
    If I understand you correctly this may do it:
    SELECT <column list>
    FROM table
    WHERE  DECODE(:Pxx_SEARCH,  'OVERALL_STATUS',overall_status,
                                 'SCOPE',scope,
    'SCHEDULE',schedule,
    'RESOURCES',resources,
    'EXTERNAL_READINESS',external_readiness) = 'G';

  • RUN Time error while use filter table in query generator

    Hai..
                   I have 2 Functions under "Scalar valued functions" in SQL Server,i try to call this functions in Query generator its working fine,result also display correctly, but i click filter table system showing  Error Message " Run Time Error,Abnormal program termination" then SAP is get closed,i tested this scenario in 3 Database am getting same error , Is this BUG in SAP B1?There is no error number in error message

    This is my function
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    -- =============================================
    -- Author:          <Author,,Name>
    -- Create date: <Create Date, ,>
    -- Description:     <Description, ,>
    -- =============================================
    ALTER function [dbo].[Get_TransObjName](@Obj_type NUMERIC(20,5))
    returns varchar(500) as
    BEGIN
    DECLARE @Obj_type_Name varchar(100)
    select @Obj_type_Name =
    case @Obj_type
    when     -2     then     'Opening Balance'
    when     -3     then     'Closing Balance'
    when     1     then     'oChartOfAccounts'
    when     2     then     'oBusinessPartners'
    when     3     then     'oBanks'
    when     4     then     'oItems'
    when     5     then     'oVatGroups'
    when     6     then     'oPriceLists'
    when     7     then     'oSpecialPrices'
    when     8     then     'oItemProperties'
    when     12     then     'oUsers'
    when     13     then     'A/R Invoices'
    when     14     then     'A/R Credit Memo'
    when     15     then     'A/R DeliveryNotes'
    when     16     then     'A/R Returns'
    when     17     then     'oOrders'
    when     18     then     'A/P Invoice'
    when     19     then     'A/P Credit Memo'
    when     20     then     'Goods Receipt PO'
    when     21     then     'Goods Returns'
    when     22     then     'PurchaseOrders'
    when     23     then     'Quotations'
    when     24     then     'IncomingPayments'
    when     25     then     'Deposit'
    when     28     then     'oJournalVouchers'
    when     30     then     'JournalEntries'
    when     31     then     'oStockTakings'
    when     33     then     'oContacts'
    when     36     then     'oCreditCards'
    when     37     then     'oCurrencyCodes'
    when     40     then     'oPaymentTermsTypes'
    when     42     then     'oBankPages'
    when     43     then     'oManufacturers'
    when     46     then     'VendorPayments'
    when     48     then     'oLandedCostsCodes'
    when     49     then     'oShippingTypes'
    when     50     then     'oLengthMeasures'
    when     51     then     'oWeightMeasures'
    when     52     then     'oItemGroups'
    when     53     then     'oSalesPersons'
    when     56     then     'oCustomsGroups'
    when     57     then     'ChecksforPayment'
    when     58     then     'Stock List'
    when     59     then     'Goods Receipt'
    when     60     then     'Goods Issue'
    when     64     then     'oWarehouses'
    when     65     then     'oCommissionGroups'
    when     66     then     'oProductTrees'
    when     67     then     'Inventory Transfers'
    when     68     then     'oWorkOrders'
    when     69     then     'Landed Costs'
    when     70     then     'oCreditPaymentMethods'
    when     71     then     'oCreditCardPayments'
    when     73     then     'oAlternateCatNum'
    when     76     then     'Postdated Deposit'
    when     77     then     'oBudget'
    when     78     then     'oBudgetDistribution'
    when     81     then     'oMessages'
    when     91     then     'oBudgetScenarios'
    when     97     then     'oSalesOpportunities'
    when     93     then     'oUserDefaultGroups'
    when     101     then     'oSalesStages'
    when     103     then     'oActivityTypes'
    when     104     then     'oActivityLocations'
    when     112     then     'oDrafts'
    when     116     then     'oDeductionTaxHierarchies'
    when     117     then     'oDeductionTaxGroups'
    when     125     then     'oAdditionalExpenses'
    when     126     then     'oSalesTaxAuthorities'
    when     127     then     'oSalesTaxAuthoritiesTypes'
    when     128     then     'oSalesTaxCodes'
    when     134     then     'oQueryCategories'
    when     138     then     'oFactoringIndicators'
    when     140     then     'oPaymentsDrafts'
    when     142     then     'oAccountSegmentations'
    when     143     then     'oAccountSegmentationCategories'
    when     144     then     'oWarehouseLocations'
    when     145     then     'oForms1099'
    when     146     then     'oInventoryCycles'
    when     147     then     'oWizardPaymentMethods'
    when     150     then     'oBPPriorities'
    when     151     then     'oDunningLetters'
    when     152     then     'oUserFields'
    when     153     then     'oUserTables'
    when     156     then     'oPickLists'
    when     158     then     'oPaymentRunExport'
    when     160     then     'oUserQueries'
    when     162     then     'Inventory Valuation'
    when     163     then     'oCorrectionPurchaseInvoice'
    when     164     then     'oCorrectionPurchaseInvoiceReversal'
    when     165     then     'oCorrectionInvoice'
    when     166     then     'oCorrectionInvoiceReversal'
    when     170     then     'oContractTemplates'
    when     171     then     'oEmployeesInfo'
    when     176     then     'oCustomerEquipmentCards'
    when     178     then     'oWithholdingTaxCodes'
    when     182     then     'oBillOfExchangeTransactions'
    when     189     then     'oKnowledgeBaseSolutions'
    when     190     then     'oServiceContracts'
    when     191     then     'oServiceCalls'
    when     193     then     'oUserKeys'
    when     194     then     'oQueue'
    when     198     then     'oSalesForecast'
    when     200     then     'oTerritories'
    when     201     then     'oIndustries'
    when     202     then     'oProductionOrders'
    when     203     then    'A/R Down Payment'
    when     204     then    'A/P Down Payment'
    when     205     then     'oPackagesTypes'
    when     206     then     'oUserObjectsMD'
    when     211     then     'oTeams'
    when     212     then     'oRelationships'
    when     214     then     'oUserPermissionTree'
    when     217     then     'oActivityStatus'
    when     218     then     'oChooseFromList'
    when     219     then     'oFormattedSearches'
    when     221     then     'oAttachments2'
    when     223     then     'oUserLanguages'
    when     224     then     'oMultiLanguageTranslations'
    when     229     then     'oDynamicSystemStrings'
    when     231     then     'oHouseBankAccounts'
    when     247     then     'oBusinessPlaces'
    when     250     then     'oLocalEra'
    when     280     then     'oSalesTaxInvoice'
    when     281     then     'oPurchaseTaxInvoice'
    when     300     then     'BoRecordset'
    when     305     then     'BoBridge'
    when     260     then     'oNotaFiscalUsage'
    when     258     then     'oNotaFiscalCFOP'
    when     259     then     'oNotaFiscalCST'
    when     261     then     'oClosingDateProcedure'
    when     10     then     'oBusinessPartnerGroups'
    when     278     then     'oBPFiscalRegistryID'
    else cast(@Obj_type as char(20)) end
    return @Obj_type_Name
    END

  • A filter value for Query is set with some value automatically

    Hello SAP sourcing Guru!
    I created a query which has several filters.
    Some of Filter's type is VLV.
    When I preview the query somehow the filter values are already set with some value even though I did not set the default value.
    For example, filter name is Region and there are four regions: Asia, NA, Europe, and SA.
    I want to select one of them from drop-down menu. But Asia was already selected when I clicked the preview button for the query. I want to see "Please Select" instead of Asia from drop-down menu. I did not select "Prefill value from cache" for the filter. I made the filter Optional only. I did not set Default Value either for the filter.
    Any clues?
    Thank you for your response in advance.

    Hi,
    In the Default value field of the filter prompts, you need to mention the Class Reference ID of the corresponding field. E.g., if you have Contract document phase as a filter, then in that if you want to display a blank or none value, then you should use null:2016.
    Similarly for vlv type, the system has a value 616. Hence if you want to display a None value insteead of Asia, use the following in the Default value field:
    0:616:null.
    The way to find the class reference ID is to goto the RG > Class Reference > Look for the field that you are attempting to default on.
    Hope this helps,
    Vikram

  • How to Filter a filtered Query with in a single query

    Hi all,
    Thanks in advance , Below is the query
    SELECT *
    FROM
    (SELECT MitarbeiterListe.IDMITARBEITERLISTE,
    MITARBEITERLISTE.JAHR ,
    MITARBEITERLISTE.mitarbeiter ,
    FIRMA.FIRMA ,
    Abteilung.Abteilung ,
    MitarbeiterStatus.mitarbeiterstatus ,
    MitarbeiterListe.OEVON ,
    MitarbeiterListe.OEBIS ,
    MitarbeiterListe.SAPPERSNR ,
    MitarbeiterListe.EKPreis
    ||'.00' "MitarbeiterListe.EKPreis",
    MitarbeiterListe.InfrastrukturkostenZuschlag
    ||'.00' "InfrastrukturkostenZuschlag",
    MitarbeiterListe.VerwaltungskostenZuschlag*100
    ||'%' "VerwaltungskostenZuschlag",
    MitarbeiterListe.Tagessatz ,
    MitarbeiterListe.Arbeitsort ,
    MitarbeiterListe.Titel ,
    MitarbeiterListe.Bemerkung ,
    BERECHTIGUNGEN.BENUTZERNAME
    FROM Firma
    INNER JOIN (Abteilung
    INNER JOIN MitarbeiterListe
    ON Abteilung.IDAbteilung = MitarbeiterListe.IDAbteilung
    INNER JOIN MitarbeiterStatus
    ON MitarbeiterListe.IDMITARBEITERSTATUS=MitarbeiterStatus.IDMITARBEITERSTATUS
    INNER JOIN BERECHTIGUNGEN
    ON MITARBEITERLISTE.IDBEARBEITER=BERECHTIGUNGEN.IDBENUTZER )
    ON Firma.IDFirma = MitarbeiterListe.IDFirma
    WHERE MitarbeiterListe.Jahr = :P9_SEL_JAHR
    AND Abteilung.IDOE =
    ( SELECT IDOE FROM OE WHERE OE = :P9_SEL_OE AND JAHR = :P9_SEL_JAHR
    ) temp
    Requirement is : we need to filter this query again based on column in select list . As using AND / OR operator we are not able to give desired result ..
    As in our case we are filtering the above query based on :P9_SEL_JAHR and :P9_SEL_OE variables ther is further requirement that we can also filter the filtered given query based on column vaue so we can get the specific columns value through bind variables and can use OR operator between them .but the problem is coming on merging the columns where case with the given query ..
    As for example if we use this afer the query
    OR/AND
    MitarbeiterStatus.mitarbeiterstatus = :P9_SL_MA_STAT OR
    MitarbeiterListe.OEVON = :P9_SL_OEVON OR
    MitarbeiterListe.OEBIS = :P9_SL_OEBIS OR
    MitarbeiterListe.SAPPERSNR = :P9_SL_SAPPERNR
    for the OR case the first query will be always true so it will not filter it baseed on column value and in case of AND the second query would return true ..so we would get filtered column value based on column bind varaible not the complete query result based on JAHR and OE bind variable.
    any way to satisfy these two cases within a single query ..suggesstions are welcomed and would be truly appreciated.
    Cheers
    sachin

    Not certain I've fully understood your required logic without examples, but I think you just need to use brackets:
    WHERE MitarbeiterListe.Jahr = :P9_SEL_JAHR
    AND Abteilung.IDOE =
    ( SELECT IDOE FROM OE WHERE OE = :P9_SEL_OE AND JAHR = :P9_SEL_JAHR)
    AND
    MitarbeiterStatus.mitarbeiterstatus = :P9_SL_MA_STAT
    OR MitarbeiterListe.OEVON = :P9_SL_OEVON
    OR MitarbeiterListe.OEBIS = :P9_SL_OEBIS
    OR MitarbeiterListe.SAPPERSNR = :P9_SL_SAPPERNR
    )

  • Filter condition in query designer

    Hi Friends,
    Can any one please tell me?
    Query is done on Multiprovider (made of Cube 1 to Cube 6 ) and in query designer under filter tab i have seen
    case 1:
    1) Fiscal year variant F4
    2) Cube 1
    Questions:
    1) what is the use of Fiscal year variant F4 in this case?
    2) Field 1 is available in all 6 cubes. In report from which cube the data is retreived for this filed 1?
    Next case 2:
    Under filter condition
    1) Fiscal year variant F4
    2) Cube 1 and cube 2
    Question: Field 1 is available in all six cubes. in report from which cube the data is retrevied for this field 1.
    Thanks
    Tony

    We have a similar situation with three cubes.  However, when we run the query in Q, the filter (restriction) works well and we get the output only from one cube.
    When the query is moved to Production (transport), with same restrictions, the query is not getting restricted for one cube initially, but hitting all three cubes in the multi provider...and hence taking a much longer time to process..
    Any ideas what could be going wrong (the query is on an aggregate level, for IP)

  • BEx Analyser: how to add filter information in query output

    Hello,
    When query is executed in BEx Analyser, there are three buttons with additional info. But none of them shows the selections that were made when the report was executed (variable screen) and the "static" filters within the query definition. How can I solve this problem?
    Thank you.
    Kind regards,
    Danijela

    I have place static filter left to the table on row 115 and then I copy it to desired destination in VBA callback function.
    (I also have filter values on row 65)
    HTH.
    BR
    Ondrej
    Sub SAPBEXRefresh(queryID As String, resultArea As Range)
        If queryID = "DATA_PROVIDER_1" Then
           j = 15
           i = 115
           While Sheet2.Cells(i, 6) <> ""
             If Sheet2.Cells(i, 7) <> "Empty selection" And Sheet2.Cells(i, 7) <> "" Then
               Sheet2.Cells(j, 6) = Sheet2.Cells(i, 6)
               Sheet2.Cells(j, 7) = Sheet2.Cells(i, 7)
               Sheet2.Cells(j, 6).Interior.Color = RGB(239, 246, 251)
               Sheet2.Cells(j, 7).Interior.Color = RGB(239, 246, 251)
               Sheet2.Cells(i, 6) = ""
               Sheet2.Cells(i, 7) = ""
               j = j + 1
             End If
               i = i + 1
           Wend
           k = 65
           While Sheet2.Cells(k, 6) <> ""
             If Sheet2.Cells(k, 7) <> "" And Sheet2.Cells(k, 7) <> "Prázdné vymezení" Then
               Sheet2.Cells(j, 6) = Sheet2.Cells(k, 6)
               Sheet2.Cells(j, 7) = Sheet2.Cells(k, 7)
               Sheet2.Cells(j, 6).Interior.Color = RGB(213, 227, 242)
               Sheet2.Cells(j, 7).Interior.Color = RGB(213, 227, 242)
               j = j + 1
             End If
             Sheet2.Cells(k, 6) = ""
             Sheet2.Cells(k, 7) = ""
             k = k + 1
           Wend
           While j < 65
             Sheet2.Cells(j, 6) = ""
             Sheet2.Cells(j, 7) = ""
             Sheet2.Cells(j, 6).Interior.Color = RGB(255, 255, 255)
             Sheet2.Cells(j, 7).Interior.Color = RGB(255, 255, 255)
             j = j + 1
           Wend
        End If
    end sub

  • Problem with report with filter from other query

    Hi All,
    I have some report with two queries:
    1. First contain Date(1) converted to int (like 20140807). This query calculate Date as getdate minus number of day which I could define (for example -8 return getdate minus 8 days).
    2. The second contain also Date(2) converted to int. I would like to add filter where Date(2) will be on the list from results in query 1. When I try do this I receive:
    Database error: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. (IES 10901) (WIS 10901)
    When I have changed number of days from -8 to -30 in query 1, query 2 return some records.
    I do not know why it work sometimes, sometimes not.

    Sathish, but I use defined by me objects (today number + days) and (today number) in BO so I do not want to change it manually.
    Arijit, the second query without any filters return records with Date(2) equal 20140715. When I add filter with Date(2) = returned data from query 1 (getdate minus 8 days) I receive error. I know that getdate minus 8 days return dates (20140807...20140801) so 20140715 is out of the range. In this case query should return blank page.
    When I change query 1 from 8 to 30 days is working correctly because 20140715 is in this range. Maybe it help to help me
    This is condition from query1:
    WHERE
      dbo_Date.DateID(1)  BETWEEN  year( ( cast(convert(varchar, dateadd(day,@Prompt('Enter the number of X days',  'N',,Mono,Free, Persistent),getdate()) , 102) as datetime) ) )*10000 + month(( cast(convert(varchar, dateadd(day,@Prompt('Enter the number of X days',  'N',,Mono,Free, Persistent),getdate()) , 102) as datetime) ))*100 + day( ( cast(convert(varchar, dateadd(day,@Prompt('Enter the number of X days',  'N',,Mono,Free, Persistent),getdate()) , 102) as datetime) ) )  AND  year( getdate() )*10000 + month(getdate())*100 + day( getdate() )
    but I use the same condition in other reports and it is work.

  • Form Filter Based On Query Results

    How can I create a filter on a form based on the results of a query.
    i.e. The Query [ESS_City] looks at the form's field [Current_User] and generate a list of cities [City_ID] that I want to use to match the form [ESS_QUEUE] field [City_ID]
    Query Name:  [ESS_City]
    Query Field:  [City_ID]
    Form name:  [ESS_Queue]
    Form Field to filter with:  [City_ID]
    Thank you,
    Mark Matzke

    I use criteria in my queries instead of filters. 
    I would have a combo in the header of the form to select City_ID.   Use that combo as criteria in the query that feeds the form.  Have an AfterUpdate event to refresh the form. 
    Build a little, test a little

  • Selection of Filter Values for Query Execution -Only Values in InfoProvider

    I created a query based on an ODS. For the query charateristic 0NFCAT_CODE a variable was created by me. To the time of query execution F4 shows all values available in the charateristic, but only values available in the ODS are expected.
    The characteristic 0NFCAT_CODE is a reference characteristic to 0CAT_CODE. 0NFCAT_CODE is compounded with 0NFCAT_TYPE (reference to 0CAT_TYPE) and 0NFCAT_GRP (reference to 0CAT_GRP). All characteristics 0CAT_CODE, 0CAT_TYPE and 0CAT_GRP are set to “Query Def. Filter Value Selection” =  “Only Values in InfoProv” and “Query Execution Filter Val. Selectn” =  “Only Values in InfoProvider”.
    Could anybody give me a help? Thanks in advance.

    Hi,
    that is master data of 0NFCAT_CODE.
    Regards,
    San!

  • Using the results of one Query in a workbook as a filter in another query

    Hello!
    I'd like to have one workbook which my users can execute and the result from one Query (e,g, Customer Account Number) will then be used as a filter in a second query (which would be from a different cube).
    Can this be done?
    Cheers.

    Hi,
    As far as I understand your requirement, you want to pass the result of one query to another query as a filter.
    Well you can do this, by Using Replacement Path Variable.
    For e.g. you want to pass Values of Custmomer Account Number to another query. In the second query, create one variable on Customer Account Number with type Replacment Path. Here it will ask you to enter the name of the query from which you would like to take the values of Customer Account Number.
    When you will run the second query , it will execute the first query from which you want to read the customer accoutn number in the back-end. And it willl display the output the second query as per the valeus of customer account number.
    This will help.
    - Jaimin

  • Filter results in query depending on value radio button

    Hi all,
    I have a "y/n" radio button group along with other fields and when submitted, you should be able to see a certain column depending on what the user chooses.
    For "y" all records should be displayed, where the column value is not null and for "n" only the records where the column value is null should be displayed.
    I've tried with conditional display for the column, but still get the records where the value is null in my report for "y".
    Can anyone help me fix this?
    kind regards,
    Cleo
    Edited by: Cleopatra on Jan 27, 2011 11:56 AM

    What you want is
    AND {CONDTION}
    AND {CONDTION}
    AND {COLUMN FILTER CONDITION}so it should be
    WHERE
    AND {CONDITION 1}
    AND {CONDITION 2}
    AND  (
              ( :ITEM_NAME = 'Y' AND <COLUMN NAME> IS NOT NULL )
              OR ( :ITEM_NAME = 'N' AND <COLUMN NAME> IS NULL )
           )Hope you have understood the reason why the column filter have been made together into an additional clause , rather than adding them them directly.
    If you are confused about the logical structure of the query, try forming them into a sentence which you would be explaining the requirement.

Maybe you are looking for