Dealing with the value of the parameter in where clause

Hello

I want to build a where clause condition containing an instruction box with control over a parameter value, something like this:

cases where when +: param + = '1' then column ('01', '04' another column = '02' end

Thank you
Magnus

Try something like this:

...
where case
        when :param = '1'
        and column in ('01','04') then 1
        when :param != '1'
        and column = '02' then 1
      end = 1

Tags: Database

Similar Questions

  • How to pass the parameter in where clause contained in the custom file?

    I have the tracking query

    Blue are the parameters

    I paste this to a custom folder

    and

    Select last_update_date, creation_date

    of ra_customer_trx_all

    "where trunc (last_update_date) = 29-SEP-2012."

    and customer_trx_id = 1109

    in another folder custom return 1 row only and create a different worksheet in the same workbook and create

    3 setting and 2 of them pointing to the 1 row to query and create a calcualtion

    SET_CONTEXT ("Date_From", TO_CHAR(:Date From)) and SET_CONTEXT ('Date_TO', TO_CHAR(:Date To))

    and 1 condition 1 = SET_PARAM3(:Period)

    but this does not work for me, no data back please help

    Select m.party_name TENANT_NAME

    b.interface_line_attribute10 lease_num

    -, b.interface_line_attribute12 «PPS Number.

    b.interface_line_attribute2 LOCATION_CODE

    flexv.description property_name

    INVOICE_NUMBER a2.trx_number

    -, t.nom "Type of Transaction".

    -, e.attribute15 "AS400 Key."

    , b2.description 'BILL_ITEM_INVOCIE_DESCRIPTION '.

    , case when gcc.segment5 like 6% ' then ' P/L '.

    When gcc.segment5 like 7% ' then ' P/L '.

    When gcc.segment5 as 8% ' then ' P/L '.

    When gcc.segment5 like 9% ' then ' P/L '.

    else "B/S".

    end as account_nature

    -, gcc.concatenated_segments as 'account of burden '.

    gcc.segment1 company_code

    gcc.segment2 department_code

    gcc.segment3 property_code

    gcc.segment4 business_segment

    gcc.segment5 account_code

    gcc.segment6 project_code

    gcc.segment7 intercom_code

    gcc.segment8 spare1

    gcc.segment9 spare2

    b2.extended_amount BILL_ITEM_INVOICE_AMOUNT

    to_char (substr(ps.gl_date,4,8)) gl_period

    b.interface_line_attribute11 bill_start_date

    b.interface_line_attribute14 bill_end_date

    decode (a2.invoicing_rule_id, '-2',

    DECODE (TO_CHAR ("b.RULE_START_DATE, ' YYYYMM"), to_char (to_date (to_char (TRUNC (to_date (SETPARAM.) GET_PARAM3, "YYYYMM"), 'Month')-1), "MON-DD-YYYY"), "YYYYMM"), "Current", "Forward").

    'In progress' Bill_nature)

    , to_char (a2.trx_date, ' MON-DD-YYYY "") invoice_date

    pal.lease_commencement_date

    pal.lease_termination_date

    h.user_name created_by

    -, NULL as remarks

    of ra_customer_trx_all one

    ra_customer_trx_lines_all b

    pn_leases_all d

    e pn_tenancies_all

    hz_cust_accounts l

    hz_parties m

    fnd_user h

    ar_payment_schedules_all ps

    RA_CUST_TRX_LINE_GL_DIST_ALL dist

    gl_code_combinations_kfv gcc

    AR_RECEIVABLE_APPLICATIONS_all app

    ra_customer_trx_all a2

    ra_customer_trx_lines_all b2

    RA_CUST_TRX_TYPES_all t

    fnd_flex_values_vl flexv

    pn_lease_details_all pal

    where

    App. APPLICATION_TYPE = "CM".

    and flexv.flex_value = gcc.segment3

    and flexv. FLEX_VALUE_SET_ID = 1014916

    and pal.lease_id = d.lease_id

    and app.applied_customer_trx_id = a.customer_trx_id

    and app.customer_trx_id = a2.customer_trx_id

    and a2.cust_trx_type_id = t.cust_trx_type_id (+)

    and a2.org_id = t.org_id (+)

    and b.customer_trx_line_id = b2.previous_customer_trx_line_id

    and dist. CUSTOMER_TRX_LINE_ID = b2. CUSTOMER_TRX_LINE_ID

    and dist.account_class = 'REV '.

    and dist.account_set_flag = DECODE (NVL(a2.invoicing_rule_id,1)-2, 'Y', 'n')

    and gcc. CODE_COMBINATION_ID (+) is Dist. CODE_COMBINATION_ID

    and b.interface_line_attribute10 = d.lease_num

    and d.lease_id = e.lease_id

    and e.primary_flag = 'Y '.

    and b2.customer_trx_id = a2.customer_trx_id

    and a2.bill_to_customer_id = l.cust_account_id

    and l.party_id = m.party_id

    and a2.created_by = h.user_id

    and ps.customer_trx_id = app.customer_trx_id

    and ps.gl_date between trunc (trunc (TO_DATE (SYS_CONTEXT ('DISCO_CONTEXT', 'Date_From')), 'MM')-1, 'MM') and trunc (TO_DATE (SYS_CONTEXT ('DISCO_CONTEXT', 'Date_To')), 'MM')-1

    What exactly is the problem with the results? Can you do the report include the gl_date, so that you can see exactly what is included?

    The only way to solve this is back to basics. You must be certain that the setting and calculations for the date work 100%. You have granted the Execute permission on the function to your landlord EUL - Yes? I did create the function in a package belonged to EUL_US, then I got no problem with permissions or grant.

    Also, gl_date is a DATE string and not a right? I ask because if it is not a date, but a string then a few dates could be left out.

    Assuming that you are 100% some of the building blocks, you should start by including only the gl_date and the primary key of the table you are using. Once you are sure you have found the right data, you can start adding in addition to fields.

    I note that you use the E-Business Suite objects. I copied the code in my system where I don't use rental. So I put comment references to tables 3 PN. I had 150 lines of data when I asked for it by using the parameter, and then when I hard coded the BETWEEN operator for the gl_date. You don't have to make sure that your landlord EUL got right SELECT all tables and views used in your code and, if you want to share this code with someone else, you must also have LICENSING rights.

    Try your code in a SQL like TOAD tool and see what happens. Are you absolutely sure that each of your transactions has an entry in the tables PN? Maybe it's why you don't get the results you expect. You can try, as I did, to comment these lines out and then see what happens.

    Hopefully this has given you enough to solve your problem

    Michael

    PS. It would be nice to know your name. You have not used once it in your thread.

  • Dealing with the size of the stage and the different orientations

    I am clearly dense, but I'm looking for examples of how others deal with the need to have apps that funciton in mode landscape or portrait.

    My first effort simply uses a scene from 600 x 600 with automatically guide the true value. It seems to work OK. The app draws, in the center of the screen of the Playbook (Simulator), regardless of the way the screen is oriented. Waste certain properties of the screen, but for my purposes, it doesn't really matter.

    To try to make it easier to deal with some questions I had try to implement new, I tried to make a step in 1024 x 600 with my stuff centered in space. Works very well in the landscape, but when in portrait mode, the app has been reduced to 1024 to the 600 dimension tree. I turned on Noscale for the scene, and now the app is drawn with the scene at the upper left corner then the app is cut on the right side of the screen. Is there a way to make the center of the scene?

    For my next one, I'll probably need to have two settings screen which are used based on direction - guidance on which is easier to deal with?

    I just wanted to mention that I removed the rotation and repositioning of the scene in the event onOrientationChange because I'm sure it was bad and can't remember why I had done this.

    Also, I recommend the mobile controls around on stage resize because when changing the orientation event is called, stage.stageWidth and stage.stageHeight properties have not yet been updated.

    The only uses for the orientation change event that come to mind anime the passage of an orientation towards another and the reorientation of handling maually when you autoOrients set to false.

  • I forgot my password for apple and have permission to stage the 2 and broken my old phone and do not have the same number of what I can do my account is already waiting to be reset, but it takes apple long to to deal with the what else is there to do?

    I forgot my password for apple and have permission to stage the 2 and broken my old phone and do not have the same number of what I can do my account is already waiting to be reset, but it takes apple long to to deal with the what else is there to do?

    You know the e-mail password what do you use? I lost over $ 30 on my old Apple ID because I couldn't get into the email and apple would not transfer my money to my new account.

  • ITunes has stolen my music from my computer. Because they do not want to deal with the public, what should I do to get back them.

    Every so often, iTunes sends a notice to update the iTunes on my computer. Last year after that they did, all sounds have disappeared from my list of reading hundreds of old songs. Now, when I click on any song or melody, nothing happens.

    Given that Apple does not want to deal with the public, I ask, what do I do now, please?

    See the empty/corrupted after upgrade/crash iTunes library. Ideally, the measures taken immediately after that the problem appeared would restore your library. In some cases your media may be still on the computer, but not when iTunes is looking to it. The songs that do not play show with an exclamation point in the view of songs? ITunes plays all audio signal at all?

    TT2

  • Image processor "sorry, I could not deal with the following... * all."

    Hey! I so about 150 files opened in Photoshop. They are for a customer and the customer wanted individually to certain effects on each file. The files are RAW initially, first imported in Lightroom as .dng, then all my tonal changes made in Lightroom. I then opened images as smart objects in Photoshop, with a script of Lightroom. I then did the individual work on each image in Photoshop on the assumption that it would not trouble to save using the Image Processor script. When it came time to save, I tried save as .tif files using Image Processor. I selected the target in the form of open files files, set my destination folder, chose the TIF format and click on run in the top of the window. He shortly after said one very fast without source images, which disappears and then he says: "Sorry, I couldn't deal with the following" and then lists all of the 150 open pictures. It is a big problem because I'm on a lack of time.

    Any help or another idea for how to register all these images open in TIF or PSD even at this stage is extremely appreciated. I think there must be a fix or other road opposite to old fashion one save under...

    Thank you!

    !

    It doesn't look like the IPP will not new document either.

    He can. I added an option that can be set in the script to take care of this problem.

    //

    PROCESS_UNSAVED_IMAGES

    This will allow the treatment of unsaved images. To make this work,

    an unregistered image file is ~ / Desktop. If a file extension is

    not in the name of the image, .psd is used.

    //

    ImageProcessorOptions.PROCESS_UNSAVED_IMAGES = true;

    By default, it is false to get the 'traditional' behavior Set to true will leave PPI to process new images, not registered.

  • I'm a software tester for an internal application to my company. version 10.0.2 is not cmopatible with a few controls within our software. I need the download v9.0.1 whatever works with the controls. Where can I get?

    I'm a software tester for an internal application to my company. version 10.0.2 is not cmopatible with a few controls within our software. I need the download v9.0.1 whatever works with the controls. Where can I get?

    Well, if you need older versions of firefox you can find them on this site:
    - http://www.oldapps.com/firefox.php

    Best regards, G-Cloud.

  • Have a problem with the Windows XP where he did not finish the boot.

    Have a problem with the Windows XP where he did not finish the boot. Ran remote console and @ the c: > guest tried to run chkdsk/r/p and received the error message "invaild drive. I put the drive in the argument?

    Hello Tmagic,

    Thank you for your message.  The correct format is below:
    chkdsk volume: (switches, e.g./r/p)

    example: chkdsk c: /r /p

    If these results find but cannot fix all the mistakes, you can also check with the manufacturer of your drive and possibly download a utility that will check the errors and repairs.
    Please let us know if it did or did not help to solve your problem.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Why the titles are not saved with the project? Where are they?

    CS5 PC.

    Why the titles are not saved with the project? Where are they? I can save them with the project?

    You can also configure a project basis including all titles.  When it's time to start a new project, open the template and change the name before starting to work.  In this way all the foundations are in place without having to implement the project with these basics every time.

  • the best way to deal with the changed values maskMode?

    Hi people

    I just found out that the values listed for maskModes have changed between CC14 and CC15 who broke most of my scripts of masking.

    IE MaskMode.ADD in CC14 has the value 6413 but CC15 is 6813.

    What is the best way to deal with this? is there a simple solution or what I need to check the version of AE which is used and adjust from there?

    is there a direct way to access the name ie "MaskMode.ADD" instead of the value?

    Thanks... /JL

    To get the string maskMode by the current mask, you can loop through all the values possible maskmodes and stop when you click on:

    for (var k in MaskMode){
        if (myMask.maskMode === MaskMode[k]) break;
        };
    // at this stage k is the maskMode string (eg: "ADD")
    

    Xavier

  • Dealing with the Dates 2

    Hi guys,.

    I'm not a regular developer, I met always hedges when dealing with dates.

    I have a timestamp column, called 'Calling_date' which stores values as this "24 July 12 AM 05.30.00.000000".

    My report must show the data in this column as "YY-MM-DD hh: mi". I tried two methods but none worked.
    * I won't use To_char *.

    trunc (calling_time, "HH24 DD-MM-YY")
    ORA-01898: too much precision specifier

    TO_DATE (calling_time,'DD-MON-YY hh: mi ')
    ORA-01830: date format picture ends before converting all of the input string

    PLS, tell which can achieve my task.
    Kind regards
    FAteh...

    Fateh says:

    I have a timestamp column, called 'Calling_date' which stores values as this "24 July 12 AM 05.30.00.000000".

    My report must show the data in this column as "YY-MM-DD hh: mi". I tried two methods but none worked.
    * I won't use To_char *.

    Why not use TO_CHAR() ?

    Date and timestamp formats are BINARY formats. Is not a screen formats.

    This means that we MUST convert that binary in a human readable format. TO_CHAR() allows exactly that - convert to a format readable by humans and which allows you to specify exactly what that format is.

  • Open the page with the parameter provided by browser

    Hello

    There is a page built on a VO with a binding of parameter p1.
    adfc-config, I read the param p1 from the entrance of the browser:

    < view id = "page1" >
    Page1.jspx < page > < / print this page >
    < input-page-setting id = "__1" >
    < security > #{param.p1} < / value >
    < value > #{viewScope.p1} < / / value >
    < / Entry-page-setting >
    < / view >

    in order to show immediately the setting depending on loading the page, data
    What am I supposed to apply again?
    for the moment, I have a button to call a procedure that defines the default where clause and calls execute query...
    but I would like to see the update without pushing buttons
    is it on the placement of function for a backing bean method? Which one? at what stage?
    or do additional installation in adfc-config?

    probably what I found, it is a peace of code, can help:
    Isn't it?

    < f: view beforePhase = "#{MainPageBean.phaseListener}" >
    < af:document id = "d1" >
    < af:form id = "f1" >

    < / af:form >
    < / af:document >
    < / f: view >

    MainPageBean.java:

    Import javax.faces.event.PhaseEvent;
    public class MainPageBean {}
    public MainPageBean() {}
    }

    {} public void phaseListener (PhaseEvent phaseEvent)
    If (phaseEvent.getPhaseId () .equals (phaseEvent.getPhaseId (). RENDER_RESPONSE)) {}
    To get the request header
    FacesContext facesContext = FacesContext.getCurrentInstance ();
    HttpServletRequest request = (HttpServletRequest) () .getRequest () facesContext.getExternalContext;
    Var currentCustomerId = request.getParameter("p1");

    Please advise/comment on

    Something like this: http://blogs.oracle.com/shay/entry/passing_parameters_to_adf_appl

  • live writing automation cannot deal with the mute switch or efx bad on/off...bad bad

    So if you mean mute a section of a track by writing automation live by turning the mute button market, the only way to do that is at an envelope at a time, and then stop playback, then press on play again and do the next envelope, press stop playin, and so on...

    If you try just keep on going and the envelopes are relatively close together, he will be like a diagonal line that it weakens or disable abrutely rather then just turn the mute or efx a far as you did when reading it is direct.

    Try it, it happens every time if you go in and out too fast.

    It should be able to follow, this is crucial, because without it's a lot of your time to get the power sequence you want for rhythmic passages, when you want on and apart from being in a certain rhythm based on other tracks or lyrics and these.

    Try playing with the settings under Edit > Preferences > multitrack > automation Options.

    Here's some of the Manual:

    Automation optimizations
    Contains options that determine how automated mix parameters are saved. (See Techniques for automating mixes.)

    Automatic correspondence unit
    Determines how fast parameters return to the original values in touch modes or lock. You can set values from 0.00 to 5.00 seconds; the default value is 1.00 second.
    Edit point linear thinning
    Removes all edit points that represent static and unchanging parameter settings.
    Minimum time interval thinning
    Creates edit points with intervals larger than the specified time value. Enter the time interval from 1 to 2000 milliseconds Minimum.
  • How to deal with the change in scope

    Dear,

    No org by enforcement period. Consolidation of the CDA. CDA entry.

    September, a company (X) is thrown into a perimeter (a-frame) and granted in a different consolidation perimeter (part B).

    I need perform the following acts:

    (A) CDA profit & loss of X, from September, must contribute to A scope results until December;

    (B) BAT profits/losses of X in September, October and December, must contribute to the results of scope B until December.

    (Operations under A) and B) can be automated? No idea how to do?

    I don't have a script. I need only a generic description on how you did.

    Thank you very much!

    According to my experience, assuming that you create a new entity for X under parent B, the best thing to do in these situations is to simply manage it via a journal entry.  You will write a day who would keep the CDA P & L (and in our cash flow of CDA case) result of X to the title of parent with equal and opposite impact hitting the new entity of X under B.  You post this journal in Sep, Oct, Nov and dec and continue loading data for a YEAR to X under B.

    However, if you simply drag & drop X under a new parent, I don't know how you deal with it.

    Kind regards
    Jason

  • Dealing with the merged cells in a table

    Hello

    I use tables often enough in InDesign, and I always ran into the same problem with the scripts - dealing with merged cells

    The number of lines, I have a few cells which are merged horizontally

    As I go through the cells in my selection, I want to test the line with the contents of the first cell in the same row - that is, the key to the line

    In short, that's what I want to do:

    1. Select the cells (manually)

    2. run the script that checks each cell in the selection to test if it is in a line that begins with 'TOTAL' - and then, act accordingly

    My problem is that the results are never is correct because some lines have merged cells

    In turn, column 1 could have 50 lines, but column 2 can only have 48 rows (because it has 2 m)

    That is why, when I check the contents of the first row as such:

    cells[1].parentRow.cells[0].contents
    

    He was not a match - even if it's in the same line.

    What is the best way to get around this problem?

    If anyone can give help on this topic, I would be very appreicate it

    Thank you

    Davey

    Why do you need to know the index of line? Isn't parentRow get you the line concerned? I tried to recreate it but I don't see the problem. Maybe you can post some more of your code where exactly is the shift is not clear.

Maybe you are looking for