Beginner question: adding restrictions to JOIN command?

So I'm trying to figure out how to add restrictions to JOIN commands. I've got these two tables AGENTS(aid, aname, city) and ORDERS(ordnum, cid, aid, qty, dollars). I'm trying to display all the agent names (aname) that are associated with the particular cid values 'c003' and 'c006' (the cid column contains values c001 through c006). Here is what I tried:
SQL> SELECT aname FROM agents JOIN orders ON agents.aid = orders.aid WHERE cid='003' OR cid='006';
Now I'm totally new to SQL so this may contain an obvious error, but I thought it made sense to simply put a WHERE clause at the end to place a restriction on the selection. Help would really be appreciated because I have been trying to figure out how to do this for hours.

Welcome to the forum!
user11920272 wrote:
So I'm trying to figure out how to add restrictions to JOIN commands. I've got these two tables AGENTS(aid, aname, city) and ORDERS(ordnum, cid, aid, qty, dollars). I'm trying to display all the agent names (aname) that are associated with the particular cid values 'c003' and 'c006' (the cid column contains values c001 through c006). Here is what I tried:Are the values of cid 4 characters, as above ('c003' and 'c006') or 3 characters, as below ('003' and '006').
SQL> SELECT aname FROM agents JOIN orders ON agents.aid = orders.aid WHERE cid='003' OR cid='006';You should always format your code. Use new lines and tabs to make the different clauses and the items in each clause stand out.
For example, the query below is exactly what you posted, with a little white space added:
SELECT  aname
FROM    agents
JOIN      orders          ON     agents.aid      = orders.aid
WHERE     cid = '003'
OR     cid = '006'
;When posting code, or any formatted text, on this site, type these 6 characters:
(small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.
Now I'm totally new to SQL so this may contain an obvious error, but I thought it made sense to simply put a WHERE clause at the end to place a restriction on the selection. Help would really be appreciated because I have been trying to figure out how to do this for hours.I don't see any obvious errors.  You should get all the agents who have at least one order with either cid '003' or '006'.
If there can be many orders for the same agent, then you'll get the agent's name repeated as many times as they have orders with the given cids.  If that's so, but you want each aname to appear only once, then change "SELECT" at the very beginning to "SELECT DISTINCT".
Aside from the possible duplicates, the query above looks like a reasonable way to get from point A to point B.  Of course, if you're starting from point X and not A, and/or you want to go to point Y rather than point B, then it's not the route you want.
So where are you, and where do you want to go?
Please post a little sample data (maybe 2 to 5 rows from each table) and the results you want to get from that data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Beginner question: adding music to start on opening

    Hello,
    This is my first post. I would like to add music to my home
    page so the music starts playing when the home page opens. Could
    someone point me in the right direction? I have contribute 3.
    Thanks in advance,
    Jay in Paris

    Hi Jay
    You can reference an earlier post by searching for the
    following.
    "Topic Title embedding MP3 Created On 02/08/2005 10:49:17 PM"
    In short, you will need to insert Flash via a SWF file to
    allow the site to play music or your other option is to insert a
    movie, like a .mov clip which wil play in the browser if the user
    has Quicktime. Users will still need the player installed locally
    on their computers to play any of the types of format you choose.
    In Contribute 4, your options will include audio enclosures,
    such as podcasts.

  • TS4036 I added Icloud to join my calendar to another person. It erased all history date from previous months. how do I get that data back?

    I added Icloud to join my calendar on my phone to another person. It erased all history date from previous months. how do I get that data back?

    i found the answer to the first part: reboot and keep hold of command+r
    this gave me a list of options
    one of them was to reinstall lion from fresh
    i went for this
    dont know why... but all forum posts i read said u should delete hard disc? theres an option for this
    which is the right option?
    any suggesstion where i go to register new mac would be great
    thanks

  • Inner join command

    Hi Forum,
    How to use Inner join command?
    Please explain with an example.
    Thanks,
    Mahathi

    Inner Join and Outer Join
    The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join. With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. With an outer join, records are also selected for which there is no entry in some of the tables used in the view.
    The set of hits determined by an inner join can therefore be a subset of the hits determined with an outer join.
    Database views implement an inner join. The database therefore only provides those records for which there is an entry in all the tables used in the view. Help views and maintenance views, however, implement an outer join.
    Specifying Database Tables
    The FROM clause determines the database tables from which the data specified in the SELECT clause is read. You can specify either a single table or more than one table, linked using inner or outer joins. The names of database tables may be specified statically or dynamically, and you can use alias names. You can also use the FROM clause to bypass the SAP buffer and restrict the number of lines to be read from the database.
    "Database table" can equally mean an ABAP Dictionary view. A view links two or more database tables in the ABAP Dictionary, providing a static join that is available systemwide. You can specify the name of a view wherever the name of a database table may occur in the FROM clause.
    The FROM clause has two parts - one for specifying database tables, and one for other additions:
    SELECT... FROM <tables> <options>...
    In <tables>, you specify the names of database tables and define joins. <options> allows you to specify further additions that control the database access.
    Specifying Database Tables Statically
    To specify the name of a database table statically, use the following:
    SELECT... FROM <dbtab> [AS <alias>] <options> . ..
    The database table <dbtab> must exist in the ABAP Dictionary. The AS addition allows you to specify an alternative name <alias> that you can then use in the SELECT; FROM, WHERE, and GROUP BY clauses. This can eliminate ambiguity when you use more than one database table, especially when you use a single database table more than once in a join. Once you have defined an alias, you may no longer use the real name of the database table
    Specifying Database Tables Dynamically
    To specify the name of a database table dynamically, use the following:
    SELECT... FROM (<name>) <options> . ..
    The field <name> must contain the name of a database table in the ABAP Dictionary. The table name must be written in uppercase. When you specify the name of a database table dynamically, you cannot use an empty INTO clause to read all of the columns into the work area <dbtab>. It is also not possible to use alternative table names.
    Specifying Two or More Database Tables as an Inner Join
    In a relational database, you normally need to read data simultaneously from more than one database table into an application program. You can read from more than one table in a single SELECT statement, such that the data in the tables all has to meet the same conditions, using the following join expression:
    SELECT...
      FROM <tab> [INNER] JOIN <dbtab> [AS <alias>] ON <cond> <options>
    where <dbtab> is a single database table and <tab> is either a table or another join expression. The database tables can be specified statically or dynamically as described above. You may also use aliases. You can enclose each join expression in parentheses. The INNER addition is optional.
    A join expression links each line of <tab> with the lines in <dbtab> that meet the condition <cond>. This means that there is always one or more lines from the right-hand table that is linked to each line from the left-hand table by the join. If <dbtab> does not contain any lines that meet the condition <cond>, the line from <tab> is not included in the selection.
    The syntax of the <cond> condition is like that of the WHERE clause, although individual comparisons can only be linked using AND. Furthermore, each comparison must contain a column from the right-hand table <dbtab>. It does not matter on which side of the comparison it occurs. For the column names in the comparison, you can use the same names that occur in the SELECT clause, to differentiate columns from different database tables that have the same names.
    The comparisons in the condition <cond> can appear in the WHERE clause instead of the ON clause, since both clauses are applied equally to the temporary table containing all of the lines resulting from the join. However, each join must contain at least one comparison in the condition <cond>.
    Specifying Two or More Database Tables as a Left Outer Join
    In an inner join, a line from the left-hand database table or join is only included in the selection if there is one or more lines in the right-hand database table that meet the ON condition <cond>. The left outer join, on the other hand, reads lines from the left-hand database table or join even if there is no corresponding line in the right-hand table.
    SELECT...
      FROM <tab> LEFT [OUTER] JOIN <dbtab> [AS <alias>] ON <cond>
           <options>
    <tab> and <dbtab> are subject to the same rules and conditions as in an inner join. The OUTER addition is optional. The tables are linked in the same way as the inner join with the one exception that all lines selected from <tab> are included in the final selection. If <dbtab> does not contain any lines that meet the condition <cond>, the system includes a single line in the selection whose columns from <dbtab> are filled with null values.
    In the left outer join, more restrictions apply to the condition <cond> than in the inner join. In addition to the above restrictions:
    EQ or = is the only permitted relational operator.
    There must be at least one comparison between columns from <tab> and <dbtab>.
    The WHERE clause may not contain any comparisons with columns from <dbtab>. All comparisons using columns from <dbtab> must appear in the condition <cond>.
    Client Handling
    As already mentioned, you can switch off the automatic client handling in Open SQL statements using a special addition. In the SELECT statement, the addition comes after the options in the FROM clause:
    SELECT... FROM <tables> CLIENT SPECIFIED. ..
    If you use this addition, you can then address the client fields in the individual clauses of the SELECT statement.
    Disabling Data Buffering
    If buffering is allowed for a table in the ABAP Dictionary, the SELECT statement always reads the data from the buffer in the database interface of the current application server. To read data directly from the database table instead of from the buffer, use the following:
    SELECT... FROM <tables> BYPASSING BUFFER. ..
    This addition guarantees that the data you read is the most up to date. However, as a rule, only data that does not change frequently should be buffered, and using the buffer where appropriate improves performance. You should therefore only use this option where really necessary.
    Restricting the Number of Lines
    To restrict the absolute number of lines included in the selection, use the following:
    SELECT... FROM <tables> UP TO <n> ROWS. ..
    If <n> is a positive integer, the system reads a maximum of <n> lines. If <n> is zero, the system reads all lines that meet the selection criteria. If you use the ORDER BY clause as well, the system reads all lines belonging to the selection, sorts them, and then places the first <n> lines in the selection set.
    Examples
    Specifying a database table statically:
    REPORT demo_select_static_database.
    DATA wa TYPE scarr.
    SELECT *
      INTO wa
      FROM scarr UP TO 4 ROWS.
      WRITE: / wa-carrid, wa-carrname.
    ENDSELECT.
    The output is:
    The system reads four lines from the database table SCARR.
    Specifying a database table dynamically:
    REPORT demo_select_dynamic_database.
    DATA wa TYPE scarr.
    DATA name(10) TYPE c VALUE 'SCARR'.
    SELECT  *
      INTO  wa
      FROM  (name) CLIENT SPECIFIED
      WHERE mandt = '000'.
      WRITE: / wa-carrid, wa-carrname.
    ENDSELECT.
    A condition for the MANDT field is allowed, since the example uses the CLIENT SPECIFIED option. If NAME had contained the value ‘scarr’ instead of ‘SCARR’, a runtime error would have occurred.
    Inner join:
    REPORT demo_select_inner_join.
    DATA: BEGIN OF wa,
            carrid TYPE spfli-carrid,
            connid TYPE spfli-connid,
            fldate TYPE sflight-fldate,
            bookid TYPE sbook-bookid,
          END OF wa,
          itab LIKE SORTED TABLE OF wa
                    WITH UNIQUE KEY carrid connid fldate bookid.
    SELECT  pcarrid pconnid ffldate bbookid
      INTO  CORRESPONDING FIELDS OF TABLE itab
      FROM  ( ( spfli AS p
                INNER JOIN sflight AS f ON pcarrid = fcarrid AND
                                           pconnid = fconnid    )
                INNER JOIN sbook   AS b ON bcarrid = fcarrid AND
                                           bconnid = fconnid AND
                                           bfldate = ffldate     )
      WHERE p~cityfrom = 'FRANKFURT' AND
            p~cityto   = 'NEW YORK'  AND
            fseatsmax > fseatsocc.
    LOOP AT itab INTO wa.
      AT NEW fldate.
        WRITE: / wa-carrid, wa-connid, wa-fldate.
    ENDAT.
      WRITE / wa-bookid.
    ENDLOOP.
    This example links the columns CARRID, CONNID, FLDATE, and BOOKID of the table SPFLI, SFLIGHT, and SBOOK, and creates a list of booking numbers for all flights from Frankfurt to New York that are not fully booked. An alias name is assigned to each table.
    Left outer join:
    REPORT demo_select_left_outer_join.
    DATA: BEGIN OF wa,
            carrid   TYPE scarr-carrid,
            carrname TYPE scarr-carrname,
            connid   TYPE spfli-connid,
          END OF wa,
          itab LIKE SORTED TABLE OF wa
                    WITH NON-UNIQUE KEY carrid.
    SELECT scarrid scarrname p~connid
      INTO CORRESPONDING FIELDS OF TABLE itab
      FROM scarr AS s
           LEFT OUTER JOIN spfli AS p ON scarrid   =  pcarrid AND
                                         p~cityfrom = 'FRANKFURT'.
    LOOP AT itab INTO wa.
      WRITE: / wa-carrid, wa-carrname, wa-connid.
    ENDLOOP.
    The output might look like this:
    The example links the columns CARRID, CARRNAME, and CONNID of the tables SCARR and SPFLI using the condition in the left outer join that the airline must fly from Frankfurt. All other airlines have a null value in the CONNID column in the selection.
    If the left outer join is replaced with an inner join, the list looks like this:
    Only lines that fulfill the ON condition are included in the selection.

  • Beginner question: Configure Tomcat for JAAS?

    Hi,
    This is a beginner question :-(. I'm trying to get JAAS to work on my Tomcat (6.0.12) installation. I used code from a Javaworld article (http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html)
    Of course I had to configure my Tomcat to work together with JAAS. The document I used is: http://tomcat.apache.org/tomcat-6.0-doc/printer/realm-howto.html
    According to the Tomcat doc I have to do the following steps before I can use JAAS to authenticate a user:
    1. Develop your code. Place the compiled classes in Tomcat's classpath
    2. Setup a login.config file for Java, and tell Tomcat where to find it (set JAVA_OPTS)
    3. Configure the JAASRealm in your server.xml
    1 Develop code: I use the following classes:
    PassiveCallbackHandler.java
    RdbmsCredential.java
    RdbmsLoginModule.java
    RdbmsPrincipal.java
    These classes I put in the package rdbmsjaas.
    In the %CATALINA_HOME%/webapps/Javaworld_Jaas/WEB-INF/lib directory I created the rdbmsjaas.jar file.
    The jsp is called jaas.jsp, and is stored in %CATALINA_HOME%/webapps/Javaworld_Jaas
    2. Setup login.config
    In %CATALINA_HOME%\conf I saved the file Javaworld_all_that_Jaas.config, containing:
    Example {
       RdbmsLoginModule required
       debug="true"
       url="jdbc:mysql://localhost/jaasdb?user=javauser&password=javadude"
       driver="com.mysql.jdbc.Driver";
    };I created an XP Environment Variable JAVA_OPTS with the value <-DJAVA_OPTS=-Djava.security.auth.login.config==C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/JavaWorld_All_That_Jaas.config> (excluding < and >)
    I used the fully qualified address, instead of $CATALINA_HOME/conf/JavaWorld_All_That_Jaas.config. I think XP balks when it sees $CATALINA_HOME).
    3 Configure JAASRealm in server.xml
    In %CATALINA_HOME%\conf\ I changed web.xml. I added the following lines:
          <Realm className="org.apache.catalina.realm.JAASRealm"
                 appName="jaas"
                 userClassName="rdbmsjaas.RdbmsPrincipal"
                 debug="99"
           />If I run the jsp from http://localhost:8080/JavaWorld_Jaas/jaas.jsp, I can enter my username/password, but when I click the Submit button, I get:
    Caught Exception: java.lang.SecurityException: Unable to locate a login configurationWhere did my configuration go wrong?
    Abel

    You will need a JSP/servlet engine such as Tomcat - Apache alone won't do it.
    I haven't seen any tutorials on set-up but the Tomcat documentation includes info on how to link to Apache. There are also books you can buy - check out the online book stores such as Amazon.
    There's also a lot of info on this forum.

  • Why can't I use the Average and Join commands in an action?

    Something I do a hundred times a day is select two endpoints, average them, and join them. I tried to make an action and map it to an Fkey, but Illustrator won't allow the Average or Join commands in an action. When I tried using the Insert Menu Command, it made Illustrator crash. Finally I managed to do it without Illustrator crashing, but there is then no way to hit "OK" in the Average dialog box via the Actions palette. Why is this apparently impossible?

    You have to use Actions Palette Flyout menu  >> insert menu item to get those menu items reocorded.
    To get action to stop crashing you need to Actions Palette Flyout menu >> Playback Options >> 1 sec or greater.
    There already are keyboard commands CMD J & OPT CMD J for these. Unfotunately you cannot record for example the next menu choice step such as BOTH.  A script likely could be written for this though, and you can try posting in the Illustrator scripting forum.

  • Beginner Question

    Hello all, hopefully I have posted this to the correct LiveCycle board!
    I'm new to Acrobat and LiveCycle in general. I'm working out of windows LiveCycle Designer 8.x  and my question is as follows....
    I'm working off of the "Quote" Form Template and what I am looking for is a way to make the rows of the Table expand as needed.  I will be converting this Template into a "Purchase Order" form, and there will be many occassions where I will need to increase the table rows - perhaps onto a second or even third page - due to the volume of different items I will be seeking prices on at a given time.
    Long story short I would like to take this "QUOTE" form template and make it such that if needed, I can expand the table size one row at a time, pushing the content beneath (Comments, subtotal, etc) onto the next page....
    Hoping I have explained my query well enough,  Could anyone provide me a solution or point me in the correct direction?
    Many thanks!

    As a followup, so as not to clog the board with numerous threads I have another beginner question
    For the sake of hypotheticals I am creating a dynamic PDF form.  This pdf is a Purchase Order Form, with a table in the Body that will expand/contract as the form user needs.  (EXA-  Default table size is 5 items, however user is creating an order for 12 items, he/she can increase the table rows to desired capactiy.) It will be a very simple layout. All data for the form will come from manual entry, no XML data binding going on.
    My new question is as follows:    Is there a way I can have this user's Adobe reader or Adobe acrobat software remember previous data entries, so that if 4 weeks after ordering widget X he/she needs to place another order for widget X, the software will autofill the table as he/she types into the table cell?
    This would be similar to how Excel will start to autofill if it recognizes a previously entered value from some other cell in the worksheet (workbook?)
    EXA-
    [NAME]   [MODEL]   [QTY]   [PRICE]
    Widget           A            433        $30.00
    Would it be possible for the software to notice that I'm typing the word "widget" somewhere after typing "wid" ???
    Many thanks for any and all followups, I'm a teenager trying to help out in my father's small business. They are in the darkages here and I'm doing my best to self teach.
    Thanks.

  • Help please! My macbook air (2015) startup showed a folder with question mark so i tried "Command   R" for internet recovery but after few minutes it stopped and showed error.. Please hepl me!

    Help please! My macbook air (2015) startup showed a folder with question mark so i tried "Command   R" for internet recovery but after few minutes it stopped and showed error.. Please hepl me!

    Startup – Question Mark
    Startup Issues - Resolve
    Startup Issues - Resolve (2)
    Startup Issues - Resolve (3)

  • How to restrict CTRL+K command to show the shortcuts

    Hi All,
    Have there anyone to help me "How to restrict *CTRL+K* command to show the shortcut list?". I want to stop this list to show all.
    And also to customize the key commands.
    Arif

    I'm assuming you're using forms on the web.
    If so, you need to edit the fmrweb.res file that sits in your $ORACLE_HOME/forms directory.
    This file will has all the keymappings for the function keys and you can customise them in there.
    To stop Ctrl-K working you will need to comment out the line for Ctrl-K/Show keys by placing a hash (#) sign at the beginning of the line.
    Further instructions can be found in the file.
    Another tack to take would be to introduce a KEY-OTHERS trigger at form level that gives a message such as 'That key not used here, please...', you will then need to explicitly define triggers for all keys that should be used, for instance a KEY-NEXT-ITEM trigger that contains the code 'NEXT_ITEM;'
    hope this helps, please mark as correct if it does.
    Edited by: Ady Keeling on Jun 9, 2010 1:13 PM

  • Inner join command is not supporting pooled table

    Hi Forum,
    I'm new to abap. I tried passing fields of two tables into a single table using inner join command. But one of the tables is a pooled table so the command "inner join" is not supporting that. How to pass the fields in those two tables into a single table? Kindly help me out.
    Rgrds,
    Mahathi

    Hi ....
    U can't perform JOIN with Pooled or Cluster tables
    trying to join A018 and KONP .... here A018 is Pooled table... Look at below threads...
    Re: abap query join A018/KONP
    Can't perform join table
    Hope it will solve your problem..
    <b>Reward points if useful.</b>
    Thanks & Regards
    ilesh 24x7

  • The selected objects cannot be joined as they are invalid objects,( Compound paths, closed paths, Text Objects, Graphs, Live Paint group). You can use Join command to connect two or more paths, paths in groups; ot to close an open path.

    Hi I was trying to join two Ractangle Tool objects but getting this type of Error in illustrator cs6 :-
    The selected objects cannot be joined as they are invalid objects,( Compound paths, closed paths, Text Objects, Graphs, Live Paint group).
    You can use Join command to connect two or more paths, paths in groups; ot to close an open path.
    Please assist me asap.

    Yes, I know this is an old post, but I’m trying to clean them up. Did you solve this problem, if so what was the solution?
    This sound like a firewall issue. I would start by disabling the firewall and seeing if you can connect. If this works then you know where the problem is,
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • Beginner question: Can I apply one formula to all cells in a column?

    Hi,
    I'm new to spreadsheets, so apologies for asking what is probably a very simple question.
    I want to apply a formula that divides the values in one column (W) by values in another (AX) for a table containing 3000 rows, and outputs the result for each row into the appropriate cell in the new column I've created.
    Numbers 09 'help' hasn't helped to this point.
    Thanks in advance for any assistance.

    GeoBrett wrote:
    Numbers 09 'help' hasn't helped to this point.
    Besides Numbers '09 Help there are two other useful resources available in the Help menu: the Numbers '09 User Guide and iWork Formulas and Functions Help.
    For "Beginner questions," my first choice would be the User Guide. For the specific question you asked, a quick scan of the chapter on "Using Formulas and Functions" (pp 83-96) will provide some useful information. Start in the neighborhood of page 93.
    Regards,
    Barry

  • Beginner question regarding 32-bit mixing and mixdown workflow

    Hello
    I have a beginner question regarding 32-bit mixing and mixdown.
    If I edit some 16Bit, 44.1kHz Stereo WAV Files and put them into multi-track view to do crossfades, how should I do the mixdown?
    Audition shows me in multi-track view, that it is doing 32-Bit mixing.
    Can I just mixdown to 16Bit, 44.1kHz Stereo without any dithering (as the files are 16Bit, 44.1kHz Stereo to begin with), or will I lose quality that way?
    I will be performing a normalization to 96% to the mixdown and then split to tracks in Audition, as in the end I want to to have an audio CD.
    I guess I could mixdown to 32Bit, then normalize and in the end save back to 16Bit, 44.1kHz Stereo WAV (with dithering, I suppose?), but I want to avoid any unnecessary converting steps.
    Greetings

    Any time you do any processing on a 16bit file in 16 bit only it will degrade the audio slightly due to rounding of the calculations. Working in 32 bit floating point (Audition's default) takes account of all bits generated due to processing.
    So it is always best to work in 32 bit, even if your originals were 16, all the way through until the last stage of saving the files for CD burning. Any losses due to conversion will be insignificant against those due to working 16 bit.

  • Beginner question - how to efficiently check if a photo is part of the selection

    Dear all,
    Sorry for this beginner question, however I don't know how to solve it and I'm sure that there is a quick and easy answer to this:
    My target is to get all the "heads of stack" (photos with Position 1 in stacks) of the selection ("photos" below).
    for i, photo in ipairs( photos ) do
      local photoName = photo:getFormattedMetadata('fileName')
       if photo:getRawMetadata( 'isInStackInFolder' ) then
       --Photo is in a stack
            local photoHeadOfStack = photo:getRawMetadata('topOfStackInFolderContainingPhoto')
            local stackPos = photo:getRawMetadata( 'stackPositionInFolder' ) -- get the position in the stack
            local photoHeadName = photoHeadOfStack:getFormattedMetadata('fileName')
            app:logVerbose("Photo nb ^1, name ^2 is in a stack with the position ^3", i, photoName, stackPos)
            if stackPos == 1 then
            -- photo is master of the stack
                 stackTop[#stackTop+1]=photo
                 app:logVerbose("Photo ^1 is top of the stack ^2", photoName, #stackTop)
                 -- check if couple if correct
            elseif photos.photoHeadOfStack then
                 app:logVerbose("Photo ^1 is in a stack, but not on top. Top of the stack already selected", photoName)
            else
                 stackTop[#stackTop+1]=photoHeadOfStack
                 app:logVerbose("Photo ^1 is in a stack, but not on top. Top of the stack ^2 - ^3 ", photoName, #stackTop, photoHeadName)
            end
      end
    end
    In the if structure in the middle checking the Position in the stack, if the Position is not 1, I would like to check if the photo heading the stack ('photoHeadOfStack') is part of 'photos'. I tried 'elseif photos.photoHeadOfStack then' and 'elseif photos[photoHeadOfStack] then' but it doesn't work ->this elseif is never true even if 'photoHeadOfStack' is part of 'photos'.
    Is there anyway to have this check done without checking "manually" photos ?(via for example a for Loop)
    I'm sure that Lua proposes this, but I don't know how...
    I thank you for your Support!

        --[[ This code creates "stackTops", an array of LrPhotos that are the
        tops of all the stacks containing photos in the array
        "photos". ]]
    stackTopSet = {}
    for _, photo in ipairs (photos) do
        local stackTop = photo:getRawMetadata ("topOfStackInFolderContainingPhoto")
        if stackTop ~= nil then stackTopSet [stackTop] = true end
        end
    stackTops = {}
    for photo, _ in pairs (stackTopSet) do table.insert (stackTops, photo) end

  • Beginner Question: SA520 Admin access through WAN port

    Dear all,
    I've a beginner question regarding my brand new SA520: How can I configure the box so that I'm able to access the admin GUI not only through the LAN ports but also from the WAN ports?
    I tried already to allow inbound traffic to the firewall's internal IP address (not sure if done right, so) and granted the admin user access profile from WAN and LAN: I can access the box from the LAN but not from the WAN. Any ideas?
    Thanks,
    Eric
    PS: Yupp, I know that it's not a good idea to expose a FW admin GUI to the WAN - but this is only a lab environment

    Go to Administration -> Users.
    click on the 'Edit User Policies' 'Login' button.  It's there you can enable WAN access.

Maybe you are looking for

  • Global temp table usage obstructed by FND SRWINIT

    Hi Friends, I am using a Global temporary table in one of my Oracle reports which is being populated in After-Param-Form trigger. But the problem I am facing is if I use the SRW.USER_EXIT('FND SRWINIT') in the Before-Report trigger, the records in Gl

  • IDOC failure in R/3 Inbound processing

    Hi   I was able to successfully generate XML files from Syndicator, but when it comes for processing in R/3 side it get fails all the time with the IDOC err msg : "IDoc included in IDoc packet containing an error: transfer it separate ".   Kindly adi

  • Can you import software instruments and plug-ins  from Logic Pro to GB

    Hello, I purchased Logic 7 Pro and I find it to be way too much for me. Is there a way to take the software instruments from Logic to GB? I am not even sure Logic comes with more software instruments than GB. Do they both rely on the Jam Packs for ad

  • ITunes opens uxepectedly, it won't stay closed.

    The subject says it all. It would be so nice if this stopped happening. And guess when it started? Yep, when I installed 7.0.1. I HATE IT. Seriously, this is only a MINOR bug compared to most of the others I'm reading about, this has to go. Anybody g

  • Lightroom import from iphoto 9.5.1

    I'm running Lightroom 9.5.1.  Trying to import iphoto.  the adobe import instructions do not match the folder layout for 9.5.1.  anyone import from thsi version of iphoto?