Lingo DB SELECT

Hi, can anyone help me with the SELECT statement I am trying
to select data from a database but I cant seem to get the SQL
right. This kind of statement works with normal SQL, but maybe its
not allowed in this arca Xtra. Can anyone help solve this?
_global.country1 = "Italy"
_global.country2 = "France"
--DB select code
err = _global.myDB.executeSQL("SELECT * FROM countryInfo
WHERE countryName = ? OR countryName = ?",[_global.country1,
_global.country2])
anyone got any tips?

What happens? What do you expect to happen?
I've successfully performed much more complicated SELECT
statements using Arca (such as those below), so I do not think the
complexity of your SQL statement is the issue. Your line of code
does a number of things all at once. To find out where the error is
occurring, you might want to break it up into more lines:
vDB = _global.myDB -- check that this is a pointer to your
Arca database
vSQL = "SELECT * FROM countryInfo WHERE countryName = ? OR
countryName = ?"
vList = [_global.country1, _global.country2] -- does this
contain the data you expect
vError = vDB.executeSQL(vSQL, vList)
If only the last line produces an error, then try:
vDB = _global.myDB -- check that this is a pointer to your
Arca database
vSQL = "SELECT * FROM countryInfo WHERE countryName =
'France' OR countryName = 'Italy'"
vError = vDB.executeSQL(vSQL)
If this produces an error, then test this hard-coded SQL
statement on its own in the Arca browser. Are the table and field
names correct? Are there records with the given values for
countryName?

Similar Messages

  • How to get the selected value in SelectOneMenu in backing bean

    Hello all,
    I need your help. I want to have 2 select menus with the second menu's items list are populated based on the selection in the first menu. I don't know how to get the selected value in the backing bean so that I can based on that select menu to populate the second menu's item list. Basically I need to access to the UI Component of the first select Menu and retrieve its selected value.
    Could you help me out?
    Thank you very much in advance,
    Lngo

    Hi Lingo,
    There r two ways of getting the values into the list. First one is hardcoding the values and the second one is use the list and get the values into the list by firing a query in the database.
    Inorder to display the values in the second menu based on the first onces selection we need to add an attribute to the first selectonemenu known as valueChangeListener and we need to sumit the page.
    Here is the sample code
    <h:selectOneMenu id="catalogue"
                                  binding="#{urbean.catalogue}" onchange="submit()"
                                  valueChangeListener="#{urbean.categoryValueChange}"
                                  <f:selectItem itemLabel="Select Catalogue" itemValue="" />
                                  <f:selectItems value="#{urbean.catalogueList}" />
    </h:selectOneMenu>
    <h:selectOneMenu id="category"
                                  binding="#{urbean.category}">     <f:selectItem itemLabel="Select Category" itemValue="" />
                                  <f:selectItems value="#{urbean.categoryList}" />
                                  <                         </h:selectOneMenu>
    now in method called by valuechangelistener we need to write the similar code
    public void categoryValueChange(ValueChangeEvent event) {
    String rfnum = (String) event.getNewValue();
    List categoryList = new ArrayList();
    List tempList = new TablenameDAO().getActiveCatByCatalogueID(rfnum);
              for (int i = 0; i < tempList.size(); i++) {
                   Tablename tablename = (Tablename ) tempList.get(i);
                   String value = "" + tablename .getrfnum();
    String label = tablename .getname();
         if (label == null) {
                   label = "";
                   SelectItem item = new SelectItem(value, label);
                   categoryList.add(item);
              bean.setCategoryList(categoryList);
    ///getActiveCatByCatalogueID (rfnum) should bring the records which r based on the rfnum
    if u follow this process i am damsure that u will get the values in to the secondlist based upon the first list
    Thanks & Regards
    Manidhar

  • Lingo and avi

    hello everybody!
    this is a new director user looking for help!
    i'm developing a movie in which some avi files are imported
    in runtime mode through some lingo commands. my problem is that the
    audio of this avi files is not available: i looked in the property
    inspector of the new member created to host the digital video and i
    found out that the audio property was not selected; by selecting it
    while the dir movie is playing, the audio is switched on. what i
    need and look for is a lingo command to access the audio property
    and switch it on in runtime mode, after avi importing operation.
    is there anybody who can help me??
    thank you in advance

    thank you very much sean!
    your advices have been very useful, first of all the one
    about the List View in Property Inspector; actually just before
    receiving your answer i tryed with member('avi').audio but it didnt
    work
    now everything works correctly!
    thank you

  • Adding a light in Lingo

    Can someone please help me with this? I want to have a light
    under a car model that shines down on the ground. I know how to
    create a light in Lingo, but I can't seem to get it to position
    under my model. Also, can I attach the light to the model?

    In that case, I would fake it.
    I would use a plane textured with an alpha channel bitmap of
    a round with a transparent feather effect (for the glow). I would
    set the emissive color of the shader for this round to
    rgb(255,255,255) to light it. Then, I would just set the visibility
    of this plane object to #both / #none when I want to display /
    discard it.
    You can create the bitmap in Firefox by creating a Shape,
    then clicking + to add the glow then select the transparent color
    for the background (in the Properties at the bottom). Then save as
    PNG (default).
    Cheers,
    Karl.
    http://www.chromelib.com

  • Camera selections ?

    Help me understand why so many indie film makers go with a DSLR cameras and more recently the Panaconic mirroless Lumix DMC GH3.
    Would a camera like the Panasomic GH3 capture better quality video than a camcorder such as the new Canon HF G30?
    The Canon captures MP4 video at up to 35Mbps and can also capture in AVCHD ( I don't recall the bit rate ) .  The Panasonic records in h.264 or AVCHD with bit rated up to 72 Mbps.
    If the camera is to be primarly for video it would seem that a video camera shoud out preform a still that shoots video.  I realize that the lens selction for the DSLR or micro 4/3rds makes a big difference,  but that asside are these hybreds better than video cameras in the same price range?  I think the preception I am getting is that one would have to spend $10,000 or more on a video camera to get the same quality footage.
    I live far to disstant frorm any camera supplier that would have a selection of these cameras to check them out.  I am hoping some on this forum has some experiences with some of these cameras and can lend some insight.

    … 'better' …
    (usually, I don't like to participate in any 'quality' debate)
    The Canon 5D mkII was the famous 'cinematographers' choice, due to its full-size sensor. Tom allready explained, why this is 'better'.- Not made for 'hours' of recording, many of these device were killed by their own heat.-
    Most videoDSLR meanwhile (and micro43s) have sensors of (smaller) APS-C size … for example Canons other famous DSLR, 550, 600, 650, 700 (rebel tx). You get designated video devices with APS-C too....
    You've heard of the 'million pixel lie'? In theory, a sensor with 'just' 1920x1080 pixel is BETTER, than any 20, 30, 40 MioPixel DSLR - due to scaling, moire, Bayer filter, etc.
    Panas GH2 got famous, due to Vitaly's hack - which modified bit-rate, intra-frame encoding, etc etc etc. Most of his features are now incl. in the GH3 ... but is it as handy as a camcorder?
    switching glasses is 'better' - if you want to and can afford these masterpieces, e.g. ≤ f1.2 ... therefore, those expensive DSLR can not compete with any 300$ Sony Camcorder stabilizer ...
    finally: aside all tech-lingo - it's all about photography! A 5.000$ CanonEOS1x doesn't do 'better' pictures in a low light living room, in the hands of drunken GrandPa It's about light, light, light. Many/most DSLR videographer in my neighborhood don't even know what a ND-filter is. Aside owning/using one .........
    summary:
    It's not the camera, it's the camera-man who does 'better' pictures.
    Spend 3h with this Emmy-awarded documentary:
    http://www.zacuto.com/the-great-camera-shootout-2011
    don't miss part II
    http://www.zacuto.com/shootout-revenge-2012
    SPOILER
    in ptII, aside Arri Alexa, Red Epic, or Kodak (film), one contestant is an iPhone!
    But plus 80 people crew, a 1Mio$ studio, a DoP with years of experience.-
    Light and the one using it.
    //sorry for venting!//

  • Director/Lingo Game HELP Please!!

    I have created a game using Director written in Lingo, for a uni project. We have been set requirements which include not being allowed to use the go to frame x behaviour.
    So instead I decided to use this code:
    on mouseDown me
      _movie.go("Levels", "IslandMission")
    end
    IslandMission being the name of the file and Levels to be the name of the marker.
    This code works but it asks to save the game if it hasn't already been before it will move to the desired destination. This was only a small issue that was able to overcome but I new issue has arised. When the background of the game has been selected it jumps to a frame within the game everytime, I have never set the background on any frame to be linked to any other frame. This makes my game impossible to play as it involves clicking moving sprites.
    Any help on what code I can use instead that won't cause these issues would be greatly appreciated thank you.

    It would appear your deadline has passed. Sorry, but I wasn't awake at 2AM If you still want your file fixed perhaps you could upload it somewhere, or PM me with your email address and you can send it to me.

  • Error message: "playlists selected for updating no longer exist"

    I tried to update my ipod nano and I guess I had deleted a playlist, but since then, I have not been able to update. Every time I try, I get the following message:
    "Cannot be updated because all of the playlists selected for updating no longer exist."
    I haven't been able to highlight which playlists are selected to begin with.
    I read through the manual and thought that maybe rebooting the whole system might work. So I deleted Itunes from my computer and re-installed.
    Then I tried re-setting my ipod. So now I have nothing on my ipod.
    I also deleted everything from my library, thinking it might help to start from scratch. Nothing has worked.
    How do I "select" and "unselect" playlists so I can get up and running again?

    Here you go.
    http://discussions.apple.com/thread.jspa?messageID=607312&#607312

  • Error while calling a select esb service

    javax.resource.ResourceException: RollbackException: Transaction has been marked for rollback:
    I encounter the above error while executing a synchronous bpel process, that invokes an esb db select service to fetch a value from the db.
    the details available for the error are:
    An unhandled exception has been thrown in the ESB system. The exception reported is: "java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 at java.util.Vector.get(Vector.java:710) at oracle.tip.esb.server.common.wsif.WSIFInvoker.readResponseHeader(Unknown Source) at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(Unknown Source) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(Unknown Source) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(Unknown Source) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(Unknown Source) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(Unknown Source) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(Unknown Source) at oracle.tip.esb.wsif.WSIFOperation_ESB.executeRequestResponseOperation(Unknown Source) at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:431) at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:353) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:192) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:733) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:368) at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:197) at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3266) at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1696) at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:184) at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:269) at com.collaxa.cube.engine.CubeE
    Please suggest
    thanx
    AJ

    Done That,
    Thanx a ton Dave, it worked.
    So I am finally moving on :-)
    Just one question Dave, I happened to work on the Beta release of this version too, the problem was not there. How come we have been able to get it in dev preview.

  • Logical operators in Oracle select query

    Hello all,
    Can i use logical operators in oracle select queries?
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?
    Regards,

    Hi,
    NB wrote:
    Hello all,
    Can i use logical operators in oracle select queries?Sure; Oracle has the logical operators AND, NOT and OR. All the comparison operators, including >, >=, = !=, EXISTS, IN, IS NULL, LIKE and REGEXP_LIKE are really logical operators, since they return logical values. You can use them in SELECT statements, and other places, too.
    for 1 and 0 =0 ; 1 or 0 =0
    if i have two fileds in a table COL1 have a value of 1010 and COL2 have a value of 0001.It's unclear what you want. Maybe you'd be interested in the BITAND function:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions014.htm#sthref1080
    BITAND is the only logical function that I know of. Many other functions, especially numberical fucntions such as MOD, have applications in logic.
    Is there any way to use select col1 or col2 from table? where or is a logical operator?Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements), and also post the results you want from that data.
    Explain how you get those results from that data.
    Always say which version of Oracle you're using.

  • Can not select from data dictionary view from a procedure

    Hi,
    I wonder, which privilege is missing here:
    my schema has this roles and privs:
    GRANT CONNECT, RESOURCE TO cb ;
    GRANT CREATE SESSION TO cb ;
    GRANT SELECT_CATALOG_ROLE TO cb ;
    GRANT CREATE SYNONYM TO CB;
    GRANT CREATE VIEW TO CB;
    I create a procedure:
    create or replace procedure dd_test as
    begin
         dbms_output.enable(2000000);
         for r in (select table_name from sys.dba_tab_partitions     where owner = 'CB') loop
                   dbms_output.put_line(r.table_name);
         end loop;
    end;
    sho err
    4/38 PL/SQL: ORA-00942: table or view does not exist
    When I run the core statement form sql prompt, it works !
    so what privilege is missing here ???
    thanks for any hint, Lao De

    Hi,
    thanks for that reply, after doing that I can not select this DD-view from sql-prompt anymore (which I don't wonder ;-). Can you tell me, what idea you had behind that test ?
    I found another instance, where the procedure works and I will compare those privileges, but it's hard to sort out that complex structure of nested roles and sys_privs.
    How ever, I will update here, when I found the missing privilege.
    regards LaoDe

  • 'IF' statement in a select statment?

    I have the following cursor in a package specification;
    cursor c_sales_code is
    select sales_condition||' MC '||sales_option
    from sales;This will return something like: 'T300 MC 9'
    MC means 'multiple choice' for when there are multiple options. Although, sales_option is sometimes null and in this case I just want 'T300' to be returned, not 'T300 MC'.
    How would I go about doing this?
    Thanks,
    fakelvis

    Use
    CASE and DECODE
    to add the functoinality of Conditional Statements in Your SQL Statements..
    These two CASE / DECODE will help you to get your desired output

  • IF Statement in Select

    I need to choose between value1 and value2 within a select statement.
    TableA
    Flag (char)
    Value1
    Value2
    ItemDesc
    pseudo code
    select ItemDesc, (if Flag = 'y' then Value1 else Value2) as Price from TableA;
    How can this be done?

    select   itemdesc,
             sum (case
                     when flag = 'y'
                        then (case
                                 when value1 < 10
                                    then value1 * 1.2
                                 else value1
                              end)
                     else value2
                  end
                 ) as price
        from tablea
    group by itemdesc;

  • If statement in select statement alias

    I have the following select statement. It has the alias Survivors, Deaths and "All Cases". Is it posible to use :P_LANGUAGE variable to say that -- IF :P_LANGUAGE = FRENCH THEN alias are Survivants for survivors, Décès for Deaths, Tous_les_cas for All Cases. Please advise
    SELECT ALL T_NTR_MULTIBAR.CAT, T_NTR_MULTIBAR.NUM_CASES_LEFTBAR AS Survivors,
    T_NTR_MULTIBAR.NUM_CASES_MIDDLEBAR AS Deaths, T_NTR_MULTIBAR.NUM_CASES_RIGHTBAR AS "All Cases"
    FROM T_NTR_MULTIBAR
    WHERE INSTANCE_NUM = :P_INSTANCENUM
    order by ORDERS

    You may not be able to add this condition inside the SQL Statement. But you can add this condition outside the statement, if you're using PL/SQL...
    IF :p_language = french THEN
    SELECT ALL t_ntr_multibar.cat,
      t_ntr_multibar.num_cases_leftbar AS survivors,
      t_ntr_multibar.num_cases_middlebar AS deaths,
      t_ntr_multibar.num_cases_rightbar AS "All Cases"
    ELSE
    END IF;

  • If statement in the SELECT???

    I use Coldfusion as my source for remoting with Flash. I have
    created different databases for different materials. However when
    an order is placed I get the "id" of the material. I also return
    the "type" of material. If I would have planned this correctly I
    would have just put all the materials in one database and returned
    what I needed just fine. As it turns out I cannot change it.
    Below is my code and basically what I'd like to do is say
    that:
    if bag_traits.trait_type = 1
    select materials.material_name where bag_orders.bag_trait_a =
    materials.material_id
    So right now it's returning a 6. I need the name of the
    material from the materials database with an id of 6. I also have a
    ribbons table where if the trait_type = 2 then I would need the
    ribbons.ribbon_name where bag_orders.bag_trait_a =
    ribbons.ribbon_id.
    How to I make an if or case statement that will pull the name
    from the appropriate database depending on the trait_type? Thanks!

    C-Rock wrote:
    >
    > Why can I not use the material_id number in more than
    one column for the
    > bag_orders table?
    >
    As far as I know, that is not the proper way to join multiple
    tables.
    To join multiple tables you use multiple joins.
    I.E.
    FROM tableA INNER JOIN tableB ON tableA.key = tableB.key
    INNER JOIN
    tableC ON tableA.key = tableC.key INNER JOIN tableD ON
    tableC.key =
    tableD.key
    Each join between to tables creates another 'relation'
    (database speak
    for table like object_ that you can then join to another
    table to create
    a new relaion and so on and so on. For complex queries it is
    usually
    much easier to start with the first to tables, confirm that
    you return
    the desire results, then add the next table. Keep adding one
    table at a
    time confirming you are getting the expected results each
    iteration
    before adding another.

  • USING NULL AND SELECT ALL IN DECODE

    COL1 has the following values:
    COL1
    ====
    A
    B
    C
    A
    B
    C
    A
    D
    D
    SELECT COL1 FROM TABLE1 WHERE COL1 =
    DECODE(:VAL1, 'A', 'AA', 'B', 'BB', 'C', 'CC', 'D', 'DD')
    1. what about the null values ? how can I add to the above statements when I enter null for the parameter :VAL1
    2. what about all the values in COL1, what shall I enter for :VAL1 ?
    THANKS.

    SELECT COL1 FROM TABLE1
    WHERE nvl(COL1,0) = DECODE(:VAL1, 'A', 'AA', 'B', 'BB', 'C', 'CC', 'D', 'DD',null,0)
    Can we use in this way?
    Shishu Paul
    Chandigarh-India

Maybe you are looking for

  • Quake 4 Will not start with USB Audigy 2 NX Connec

    Anyone playing Quake 4 successfully with the USB Audigy 2 NX installed? Will there be a driver update so this game will play? Activision was no help. When I disconnect mine I can play the game fine... other than no sound. How about a driver update Cr

  • SetFocus in a control by default during pageload

    Hi, I am using flex builder 2.0. I want to setFocus on a textbox during pageload. I have tried to setocus on that control in the below two event's of a application object 1. CreationComplete 2. Activate But Cursor is not getting focus on that control

  • Cannot access backup files external drive - only unknown user can

    I've been in problems since a while with the _unknown user issue. I've read several discussions like the following: https://discussions.apple.com/thread/2290911?threadID=2290911 My problem is the following. I upgraded to snow leopard 10.6.7 and I did

  • Photoshop Cannot Open Recently Saved 1GB File

    I created a file today for a tradeshow display.  The image saved and is approx 1.23GB. I attempted to reopen the file and received an error message that the file is not compatible with this version of photoshop.  I'm running a Mac Pro with plenty of

  • Directing where purchased music goes?

    Is there a way that you can direct where a purchased song goes, and also where a song copied from a CD goes? I have 2 ipods working on the same PC, and would like to see if instead of going directly to the library, you can decide what playlist a song