Using the "IN" expression in SQL statement

Hi,
I have an array with multiple values stored in it. I would like to use these values in the filter expression of another query using the "IN" clause (data is coming from a sql dataabse). Is there a way to achieve this, I did not see an option in the std query template for using the "IN" expression.
Thanks.

Or, to save Params, pass in a comma separated list of match values:
select * from mytable where mycolumn in ([Param.1])
And if you are getting the comma separated list from say an iBrowser, here are two quick utilities to build a comma separated list of the iBrowser values or iBrowser Datalink values:
// returns comma separated list of DATALINK values from iBrowser.
// if none selected, returns list of all values
function getCSLDatalinkValues(myApplet) {
     var selValues = "";
     var selCount = myApplet.getBrowserObject().getSelectedItemCount();
     if(selCount) {
          for(var i=1; i<= selCount; i++) {
               selValues += myApplet.getBrowserObject().getSelectedDatalinkValueAt(i) + "','";
     } else {
          for(var i=1; i<= myApplet.getBrowserObject().getItemCount(); i++) {
               selValues+= myApplet.getBrowserObject().getDatalinkValueAt(i) + "','";
     // remove trailing ","
     selValues = selValues.substring(0,selValues.length-2);
     // insert begin "'"
     selValues = "'" + selValues;
     return selValues;     
// returns comma separated list of values from iBrowser.
// if none selected, returns list of all values
function getCSLValues(myApplet) {
     var selValues = "";
     var selCount = myApplet.getBrowserObject().getSelectedItemCount();
     if(selCount) {
          for(var i=1; i<= selCount; i++) {
               selValues += myApplet.getBrowserObject().getSelectedItemAt(i) + ",";
     } else {
          for(var i=1; i<= myApplet.getBrowserObject().getItemCount(); i++) {
               selValues += myApplet.getBrowserObject().getItemAt(i) + ",";
     // remove trailing ","
     selValues = selValues.substring(0,selValues.length-1);
     return selValues;     

Similar Messages

  • Is it possible to use the Copy Express to copy across Approval Procedures?

    Hi,
    We're running SBO 8.8 for a new customer and need to copy the Approval Procedures from one database to another - there are absolutely loads and it'll too painful to create them manually.
    We can't see the option in the Copy Express tree - can anyone help?
    Is it possible to use the Copy Express to copy the Approval Procedures object? Is there another way (perhaps via insert statement in SQL)?
    Please assist!
    Thanks,
    Mohsen

    Hi Mohsen,
    Due to the complicity of the approval procedures, I think it is too hard to build a copy tool for this under current system structure.
    As for insert statement in SQL, it is absolutely a no go. Unless you want the risk to lose SAP support, never try that. You have to re-create them.
    Thanks,
    Gordon

  • How to use the CASE Expression in Where Cluase?

    Hi All,
    I'm trying to use the CASE Expression in the Where Clause at some trigger on the Form?
    I've tried this Code:
    Declare
    N Number;
    begin
    SELECT COUNT(E.EMP_SID)
         INTO N
         FROM EMPLOYEES E, RANKS R
         WHERE CASE WHEN R.qualification_sid = 1104 AND E.rank_sid = 8 THEN
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1)
         ELSE
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1)
         END
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR');
    END;
    When I run this code as a normal query at any SQL editor it works successfully, But When I Compile it at some trigger on the Form it gives me this error:
    Encountered the symbol "CASE" when expecting one of the following:
    ( - + mod ......
    Heeey how to specify the previous code to be shown as code in the thread?
    Note: I'm using Forms 6i

    OK I tried it and worked but for one condition:
    WHERE DECODE (E.qualification_sid, 1104,
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    But how to put two conditions for the same Expression:
    WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    The previous code gives me this error: missing right parenthesis

  • Can the format of a SQL Statement modify the execution time of an SQL ....

    Can the format of a SQL Statement modify the execution time of an SQL statement?
    Thanks in advance

    It depends on:
    1) What oracle version are you using
    2) What do you mean for "format"
    For example: if you're on Oracle9i and changing format means changing the order of the tables in the FROM clause and you're using Rule Based Optimizer then the execution plan and the execution time can be very different...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2009/12/29/estrarre-i-dati-in-formato-xml-da-sql/]

  • Determining the "type" of a SQL statement

    I'm using the Oracle thin driver with my JDBC program.
    I want to be able to accept a String containing a SQL statement from the user and execute it. If it's a select statement then present the rows returned in a JTable, otherwise retrieve the return value for the command (eg INSERT, DELETE, etc).
    Is there any "readymade" method in JDBC or Oracle driver to determine the type of a SQL statement in this sense. Or do I have to parse it myself? (Imagine having to write code to strip comments out etc!)

    There is no "readymade" method. But an easy way to check will be to check the first 6 charchters of the string.
    You could use
    newString = SQL.substring(0, 5); to obtain the first 6 characters.
    if the characters are "select"
    //do select things
    else
    // do insert/delete whatever things

  • Check the validity of a SQL statement before execution

    Hi everyone,
    In an applet I have created, I am allowing the user to create a SQL statement which will be sent to a servlet that in turn issues the JDBC request for the SQL statement. My concern is that since my GUI lets the user create more or less any kind of SQL statement (including an illegal one) I need to verify if the user has created the correct SQL. How can this be achieved?
    To recapitulate and summarize, I need to know how I can check the validity of a SQL statement without actually executing it and handling the SQLException. FYI, I am using the mm-mysql driver.
    Thanks,
    Alan

    jschell is correct. Unless you're writing something like an ISQL tool you want to be very careful doing this.
    Having said that Mimer SQL have SQL validators that may do what you want http://developer.mimer.com/validator/index.htm
    They've also got the SQL Validator running as a web service that you can use. Theres example code here showing how to use it.
    http://sqlvalidator.mimer.com/index.html
    At the risk of being accused of selfpromotion you can check out the SQL Validator plugin for SQuirreL SQL CLient. This is a fully functional example of using the Mimer SQL Validation web service. http://squirrel-sql.sourceforge.net/
    Col

  • Can you use the Airport Express A1264 as an AP and a DHCP server at the same time?

    Can you use the Airport Express A1264 as an Access Point and a DHCP server at the same time?
    I would like to use it as a DHCP server and AP at the same time in my LAN (no internet, just local machines through a few switches). I was lead to belive this could be the case from a few networking friends that haven't been friendly enough to help me out setting it up.

    I need it to act as a dLink/Cisco/Linksys/etc basic wifi router, in the fact that you can access it via wifi, and it will spit out DHCP addresses (192.168.1.xxx) to everything wired downstream of it.
    I want to simultaniously provide a Wifi connection and a LAN connection at the same time
    Thanks,
    BRad

  • How to use the Dynamic Expression in BRFplus

    Hi Experts
                   I am new to BRFplus. Can you give any document on BRFplus how to use the Dynamic Expression.
    Thankyou
    Venkat

    OK I tried it and worked but for one condition:
    WHERE DECODE (E.qualification_sid, 1104,
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    But how to put two conditions for the same Expression:
    WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    The previous code gives me this error: missing right parenthesis

  • Can I connect multiple Mac's using the Airport Express?

    As subject. I have got an Intel iMac and a MacBook. Can I connect them using the Airport Express? Or in another word, to create a network among them that I can see the other Mac on one Mac?
    Sorry, if I raised a silly question. But really like to know.
    Many thanks in advance.
    Gary

    Can I connect them using the Airport Express?
    Yes
    Or in another word, to create a network among them that I can see the other Mac on one Mac?
    Yes

  • Can i use the airport express in my hotel with wired connection?

    I'm going to be traveling quite a bit coming up and staying in hotels with wired internet connections in the room.  Can i use the airport express to connect with the hotel's internet connection and then my ipad and/or iphone 4S?  I'm new to Apple products so will certainly appreciate any info that may help.  Thank you!

    You will need to have AirPort Utility installed on the iPad and/or iPhone. It is free on the App Store
    App Store - AirPort Utility
    Connect the AirPort Express 802.11n to the hotel Ethernet jack using an Ethernet cable
    Power up the AirPort Express and wait 40-45 seconds
    Tap Settings, then tap Wi-Fi on the iPad
    Tap the AirPort Express under the heading of Set up an AirPort Base Station
    AirPort Utility will take a moment to to analyze the connection and then you can proceed with the easy guided setup
    Once the AirPort Express is configured, you should not have to set it up again at the next hotel. But, you could if you want to.

  • How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.

    How many airport express can I add to my network for the purpose of using the airport express to send audio signal to different rooms in the house? I'm interested I'm running about six different zones.
    What I'm looking to do is to have self powered in ceiling speakers in every room in my house with out having to run wires to every room to carry the audio signal. I would like to use the airport express to do the job of carting the audio signal.
    Here's my set up now I have an airport extreme and one airport express that I use to carry audio to one room.

    FWIW. I have used up to four AirPort Express Base Stations (AX) for streaming sucessfully in pretty much the way you have described. I didn't have a need to try more so I can't attest that more would or would not work.

  • How to export the result from executing sql statement to excel file ?

    HI all,
    Great with Oracle SQL Developer, but I have have a trouble as follwing :
    I want to export the result from executing sql statement to excel file . I do easily like that in TOAD ,
    anyone can help me to do that ? Thanks so much
    Sigmasvn

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • Can I use the airport express with a desktop computer that is not wire less- I want to have wifi in the house for an iphone

    Can i use the airport express with a desktop computer not wifi- I want wifi for my iphone

    I can't seem to find any information anywhere.  It seems like it should work since the AX is showing up on his wifi settings on both his iPhone and iPod.  Not to mention the Apple "Genius" told him that it should work.  However, they also told him that it came with an ethernet, USB and the stereo patch cables...

  • Can I use the Airport Express as a cable modem?

    I am trying to set up wireless internet in my home, and I am planning to purchase an Airport Express. Can I use the Airport Express as a cable modem, or do I have to purchase a modem from the ISP and then connect the AE to the output of the cable modem?
    Thanks,
    Adrian

    No, the AirPort base stations do not perform the functions of a DSL or cable modem, so you will still need to acquire one.

  • Can I Animate Individual Characters in a Text Block Using the Wiggle Expression?

    I'm new to After Express and just diving in to expressions. I was trying to figure out if there was a simple way to use the wiggle expression in a way that it would wiggle individual characters in a text block independently of each other.
    Definitely appreciate any help.

    Did you try the Wiggly Selector? Alternatively, you could add an Expression Selector and add and Amount expression like this:
    seedRandom(textIndex,true);
    wiggle(1,100)
    Dan

Maybe you are looking for

  • Won't let me back up to dvds

    I'm trying to back up itunes right now and it the keeps on opening my cd drive, which doesn't recognize dvds. So, I put the dvd in the drive that recognizes it and itunes doesn't do anything. I've tried it with several different disks. I also can't u

  • Delivery costs in PO

    Hi, Delivery costs wrongly entered in PO and MIGO made. But after founding the correct delivery costs,the MIGO was cancelled for the PO. But when try to enter the new delivery costs,system not allowing  to enter the new delivery costs. How to go with

  • Does elements 13 support 8.7 camera raw?

    Does Elements 13, support camera raw 8.7. if not can it be updated via the help menu. Many thanks, Darryl.

  • HT3209 why is there not just a button I can click that will tell me, whether or not my system is able to play HDCP

    As the title says, I find it really difficult to verify whether or not the computers I use (PC) can play HDCP. There doesn't seem to be a "Click here to see if your computer supports HDCP"-type of link anywhere. It would be really nice if there was.

  • WLS6sp2 Hot deployment in cluster does not work

              I have two WLS6sp2 servers in cluster in two different machines. There is an EJB           deployed in the cluster that works fine. Now I go to the console and I undeploy           it: the servers show a message of "ejb undeployed". Now I a