Help with an advance mysql query

I'm using CF 7 to query a MySQL 5 DB.
I was wondering if it's possible to add an OR operator in a
subquery or at the end of a conditional statment. Let's say that in
my conditional WHERE statement after a few inclusive conditions, I
wanted to add an "AND & OR" logic.
maybe by including part of my code I can be a little more
clear:
<cfquery name="domysearch" ...>
SELECT
a.id as id,
b.company as company,
c.add_line1 as add_line1,
FROM registratn_contacts a, registratn b,
registratn_addresses c
WHERE a.owner = #arguments.owner#
AND b.id = a.master_record
AND c.id = a.address_id
AND c.state = 'NY'
OR c.state = 'CA'
I would like to know if I can or should accomplish this in my
query or if I should have this logic outside the query?
Thanks for any help!!!!
Carlos

WHERE .....
AND (c.state = 'NY' OR c.state = 'CA')
You can use an OR, but it is probably
better to use an IN clause, as it is essentially an OR, and
would be more efficient.
AND c.state IN ( 'NY', 'CA')
Phil

Similar Messages

  • Help with a advanced SQL query

    I have a table with the help of standard lengths of material. (tblStdLength)
    In another table are the lengths that are in stock at the material. (tblOnStock)
    I would want to match these two tables to find out how much of the stock of standard lengths you have in stock the table.
    If the length is longer than the nearest standard length, the drag of the excess down to the nearest standradlängd if there is an X "CUT field.
    However, I have encountered a problem and can not solve this ...
    Ex:
    Material Cable23 have 4 standard lengths in Table tblStdLength:
    {code}
    Material          StdLength
    Cable23          |     2000
    Cable23          |     4000
    Cable23          |     6000
    Cable23          |     8000
    Materials Cable23 have the following lengths in stock in Table tblOnStock:
    Material          Factor          Length          TotalQty          Cut
    Cable23          |     1     |     383     |     383          |          
    Cable23          |     1     |     424     |     424          |
    Cable23          |     1     |     998     |     998          |
    Cable23          |     1     |     1000     |     1000          |
    Cable23          |     3     |     4000     |     12000          |     X
    Cable23          |     1     |     4234     |     4234          |     X
    {code}
    In this mode, shall the lengths of 12000 + 4000 include in the calculation of the total stock of standard lengths.
    The answer should be 16000.
    4000, it gets of 4234. It has X on the 'Cut' field and then it round down to the nearest standard length.
    How do I do this best? Hope I explained so you understand ...

    Hi again,
    SQL works great when there are several lengths (rows) in the table tblStdlength. But sometimes there is only one standard length per matrial in the table (1 row), then it does not work. Why? Assumes lead function that there should be several rows?
    with tblStd as
           select Material
                    , stdlength
                    , lead(stdlength) over (partition by material order by stdlength) hstdlength
                    from tblStdlength
    select t.Material
             , sum(floor(s.total_qty/t.stdlength)*t.stdlength) tot_quantity
         from tblStd t, tblonstock s
                where t.material=s.material
                          and s.length >= t.stdlength
                          and s.length< t.hstdlength
                group by t.material

  • I need help with DW, PHP & MySQL please.

    Hello, I am new to website development and am trying to set up a form for collecting data on my website and have a question that I can’t find an answer to anywhere else. I was wandering if someone there would be kind enough to help?  I am using Dreamweaver in CS4 and my host already has PHP & MySQL installed on the server that I can use.  My question is: Do I need to download XAMP or WAMP on my computer before trying to connect my form to the server?  Also, do I need to change the page I am putting the form on to .PHP extension or can I just embed the PHP form into an existing HTML page?
    Most of the training tutorials I’ve read don’t start at the most basic beginning but rather expect people to already have a basic knowledge of the topics they are trying to learn.  If anyone knows the best place to get answers to the most basic questions like this one or a beginners guide to working with DW, PHP & MySQL I will gladly go there rather than waste your time on questions you’ve probably already answered a bezillion times.
    Thank you for the help.

    Strictly speaking, you don't need XAMPP or WAMP on your local computer. But if you're serious about getting involved with PHP/MySQL, you should definitely set up a local testing environment with one or the other. It's safer and more efficient. Don't expose all your errors on a live server. You can find instructions on  how to set up a testing environment here: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.
    To develop with PHP, you should always use a .php file name extension. Any other choice is very rare.
    There's a tutorial on building your first dynamic website with DW here: http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html.
    For more in-depth help, you might want to consider grabbing hold of a copy of "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP". (Yes, I wrote it, so it's a bit of shameless self-promotion, but you'll find it answers many of your questions - and probably a lot you hadn't even thought of.)

  • Help with Converting an Access query

    Hello:
    First time poster and would appreciate some help in converting this Access query into T-SQL so I can use in a Stored Procedure. I don't need help in resolving the syntax for the variables as parameter in the second query, but stuck in writing the first query
    in T-SQL . I assume I need some type of nested query with a left join to another query in T-SQL. 
    How do I convert this from Access into MS-SQL
    SELECT TBL_MONTH.L_Month, TBL_MONTH.L_MonthName
    FROM TBL_MONTH LEFT JOIN qry_MonthCheck ON TBL_MONTH.L_Month = qry_MonthCheck.L_Month
    WHERE (((qry_MonthCheck.L_Month) Is Null));
    qryMonthCheck in Access is defined as
    SELECT TBL_MONTH.L_Month, TBL_SIGNOFF.SO_YEAR, TBL_SIGNOFF.SO_USER, TBL_SIGNOFF.SO_LOCATION
    FROM TBL_MONTH RIGHT JOIN TBL_SIGNOFF ON TBL_MONTH.L_Month = TBL_SIGNOFF.SO_MONTH
    WHERE (((TBL_SIGNOFF.SO_YEAR)=[forms]![frm_signoff]![cboyear]) AND ((TBL_SIGNOFF.SO_LOCATION)=[Tempvars]![tmpVarUserLOC]));

    It is very much up to personal taste. For tables I use no prefix at all. Or suffix. I prefer plural: categories, products, etc. For junction tables, I drop the plural in the first entity, for instance productcategories. As for the case, many people prefer
    initial uppercase, while I go for lowercase only. But initial uppercase has its points, particularly in documentation. I am a staunch advocate of using case-sensitive collation for metadata. I don't see any point in mixing productcategories, Productcategories,
    ProductCategories etc. That can only cause confusion.
    As for either entities, I don't use views much, and I don't have any prefix for these either. In fact, several views I've been involved used to be tables once upon a time.
    If you want to add a marker to the object name, I recommend using a suffix. It is much easier to find objects in the version control system and other browser, when not everything is cluttered on the same letter. For instance, I typically add _sp at the end
    of stored procedure names.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • Help please on advanced MySQL...

    Dear all:
    Sorry for posting some MySQL-related topics here, which neverthess is a portion of a Java intensive project =) I tried to ask for some help on MySQL forum but it seems here would be more gurus on MySQL!!
    Basically I need to do some manipulation on an existing table, with the task detailed as follows:
    For each pairwise rows/records in a table which have disparate values on the same attribute/column, say A, check and then record (to be passed on and computed later in Java environment) all column names with identical values in these two rows. For example, suppose the table is like: A  B  C  D        <-- Field/Column Names
    a1 b1 c1 d1
    a2 b1 c2 d1
    a2 b2 c1 d2 Then
    (1). consider row1 & row2, which have different values on A, they coincide on column B and D, so 'BD' needs to be recorded;
    (2). consider row1 & row3, which have different values on A, they coincide on column C only, so 'C' needs to be recorded.
    So as for column A, {BD, C} is the wanted answer.
    What Im planning now is just join the table with itself, specifying different values on A. Something like: SELECT [column name/s??] FROM theTable t1, theTable t2 WHERE t1.A <> t2.A AND
    [some value comparisons on B, C and D, respectively to find out which one/s(column name/s) should be recorded] Any help is welcome & many thanks in advance!!
    Frank =)
    P.S.: I feel that there should be a way to do some computation within MySQL, but just cannot find the way to it!! Althernatively, the computation may be done in Java but this would cause a big performance degradation since it incurrs enormous information passing between Java & MySQL via JDBC.

    Thanks very much for your reply!! =)
    Sorry for not making the question a bit clearer.
    So, for every pair of rows (or a subset of all thepairs?), you need to extract which columns match on
    that pair
    First of all, I need to look at each attribute once
    at a time; the example in my 1st post was for field A
    (subsequently I need to examine B, C, D one after
    another)
    When looking at a field, again let's say A, I need to
    elicit ALL pairs of rows which have DIFFERENT values
    on A, i.e. t1.A <>t2.A, and then compare if both have
    the same values on any other columns; if so, record
    the column names. However I cannot specify 'AB' in
    the SELECT clause, since there's no way to find out
    their values coincide on 'AB' prior to computation.Unless I'm totally missing the point, yeah, there is. The where clause tells us that they will coincide on exactly AB.
    You need separate queries for each combination--one query for 'A', one for 'AB', one for 'AC', etc.
    If you don't want to do that, you'd have to grab each pair of rows, and then basically do a bunch of if tests (or generate a map or something) to see which fields match. I don't know if you can do that in SQL or not. I suppose you could in a stored proc, but I wouldn't know how.
    In Java it's easy, but it requires either storing the entire table in memory or making many trips to the DB.

  • Need some Help with CFUPDATE into MySQL

    Hi
    I am trying to update a MySQL database with a Coldfusion Form which has brought in the information from another form.  The Form action for the update form is as follows:
    <form action="update_sup.cfm?GID=#qsupname.SupplierCode#" method="post">
    This bit seems to work in so far as it generates a URL that includes the Supplier Code:
    www.website.com/update_sup.cfm?GID=193BA3BE-C09F-087E-DACCEE9702D6C5C1
    But the SQL query doesn't actually update:
    SQL Queries
      CFUPDATE (Datasource=kw5336, Time=0ms, Records=0) in /website/update_sup.cfm @ 22:27:00.000
    update Suppliers set SupplierName=?,SalesRepName=?,SalesRepPhone=?,Address1=?,Address2=?,Notes=? where SupplierCode=?
    The Form Fields in the Debug show the changes:
    Form Fields:
    FIELDNAMES=SUPCODE,SUPNAME,SUPADDR1,SUPADDR2,SUPCITY,SUPPCODE,SUPPTERMS,SUPREPNAME,SUPREPP HONE,SUPREPEMAIL,SUPNOTES
    SUPADDR1=Unit 55 Portland Drive
    SUPADDR2=Kiln Farm
    SUPCITY=Milton Keynes
    SUPCODE=193BA3BE-C09F-087E-DACCEE9702D6C5C1
    SUPNAME=SupplierF
    SUPNOTES=
    SUPPCODE=MK17 2RB
    SUPPTERMS=30
    SUPREPEMAIL=[email protected]
    SUPREPNAME=Paul Argenta
    SUPREPPHONE=01555 123456
    What have I missed??

    Can I just say a big THANK YOU to all you lovely people who responded so quickly.  It turned out to be a typo but the responses have helped me with other ideas so that was really wonderful.
    I like this place!

  • Help with a "save as" query or an alternative suggestion

    Hi all
    Hope someone can spread some light on this for me, im rather new to using adobe pro - and never ventured into java scripts as yet..
    I have created a pdf document with various text boxes within the document. The document will be pushed out to external users who will only have access to adobe reader.
    My query is this:
    I've created a save button, but can the file name automatically be set to include the data in one of the text fields. I still want the user to chose where to save the document but want the file name to be fixed to the data in the relevant text box.
    If it can be done is it a relatively straight forward procedure.
    If this is not possible, then as an alternative is it possible ible to create maybe a Warning or pop up box after clicking on the "save as" button to prompt the user to save with a different file name to avoid saving over previous versions etc.
    Again if this is this possible, is it difficult to achieve?
    Many thanks in advance for any help!
    Cheers
    Adam

    This tutorial contains a lot of information about saving a file in Acrobat
    using JavaScript:
    http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript
    The bottom line is that in order to do it you must have a script installed
    on the local machine.
    The alert is possible, but at the moment it is displayed the user can no
    longer cancel the save command, so you can't really tell them to cancel it
    at that time...

  • Help with a simple XMLTable query

    Newbie Oracle XML developer here and need a little guidance on how to retrieve multiple records in an xmltype table using xmltable.
    My document in the xmltype table looks like this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <echoems:ECHOMetrics xmlns:echoems="http://myURL/myFilename.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://myURL/myFilename.xsd
    http://myURL/myFilename.xsd">
    <OrderMetrics>
    <OrderItemMetric>
    <requestor>user1</requestor>
    <product>123</product>
    </OrderItemMetric>
    <OrderItemMetric>
    <requestor>0.0.0.0</requestor>
    <product>ABC</product>
    </OrderItemMetric>
    <OrderItemMetric>
    <requestor>user3</requestor>
    <product>XYZ</product>
    </OrderItemMetric>
    </OrderMetrics>
    </echoems:ECHOMetrics>
    I want to get all the products:
    Product
    123
    ABC
    XYZ
    I know to use XMLTable but am not sure how exactly to write it. If just one record, the following worked fine:
    select extractvalue
    (object_value,
    'echoems:ECHOMetrics/OrderMetrics/OrderItemMetric/product',
    'xmlns:echoems="http://myURL/myFilename.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
    ) object_value
    from echoXML;
    But with multiple records, I'm trying XMLTable but can't get it right. Trying something like this:
    select m.product
    from echoXML3
    xmlTable(
    (object_value,'echoems:ECHOMetrics/OrderMetrics/OrderItemMetric/*','xmlns:echoems="http://myURL/myFilename.xsd')
    passing object_value
    COLUMNS
    product varchar2(85) path 'product') m;
    Thanks in advance for any help on this.

    One more question. Instead of putting the xml doc in the query, how do I reference it from the xmlType table?
    You have:
    select *
    from xmltable
    '//OrderMetrics/OrderItemMetric'
    passing xmltype(
    '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <echoems:ECHOMetrics xmlns:echoems="http://myURL/myFilename.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://myURL/myFilename.xsd">
    <OrderMetrics>
    <OrderItemMetric>
    <requestor>user1</requestor>
    <product>123</product>
    </OrderItemMetric>
    <OrderItemMetric>
    <requestor>0.0.0.0</requestor>
    <product>ABC</product>
    </OrderItemMetric>
    <OrderItemMetric>
    <requestor>user3</requestor>
    <product>XYZ</product>
    </OrderItemMetric>
    </OrderMetrics>
    </echoems:ECHOMetrics>')
    columns
    prod varchar2(20) path 'product',
    requestor varchar(50) path 'requestor'
    However, the xmlDocument is already in an xmlType table called echoXML3 based on the xsd. I'm just trying to query it to get a relational result set. How, in the query above, do I replace the hardcoded xmlDoc with the xmlDoc located in my xmlType table?
    I thought maybe something like this but it's not working:
    select *
    from xmltable
    '//OrderMetrics/OrderItemMetric'
    passing xmltype(select value(e)
    from echoXML3,
    TABLE(xmlsequence(extract(object_value,'echoems:ECHOMetrics/OrderMetrics/OrderItemMetric/*','xmlns:echoems="http://myURL/myFilename.xsd'))) e)
    columns
    prod varchar2(20) path 'product',
    requestor varchar(50) path 'requestor'
    Message was edited by:
    user619814

  • Help with Finding Duplicate records Query

    HI,
    I am trying to write a query that will find duplicate records/cases.
    This query will be used in a report.
    So, here are the requirements:
    I need to find duplicate cases/records based on the following fields:
    DOB, DOCKET, SENT_DATEI was able to do that with the following query. The query below is able to give me all duplicate records based on the Criteria above
    SELECT      DEF.BIRTH_DATE DOB,
               S.DOCKET DOCKET,
               S.SENT_VIO_DATE SENT_DATE, COUNT(*)
    FROM SENTENCES S,
                DEFENDANTS DEF
    WHERE      S.DEF_ID = DEF.DEF_ID
    AND       S.CASE_TYPE_CODE = 10
    GROUP BY  DEF.BIRTH_DATE, S.DOCKET, S.SENT_VIO_DATE
    HAVING COUNT(*) > 1;
    //I AM GOING TO CALL THIS QUERY 'X'Now, the information to be displayed on the report: defendants Name, DOB, District, Docket, Def Num, Sent Date, and PACTS Num if possible.
    The problem that I need help on is how to combine those queries together (what I mean is a sub query). the 'X' query returns multiple values. please have a look at the comments on the query below to see what I'm trying to achieve.
    here is the main query:
    SELECT      INITCAP(DEF.LAST_NAME) || ' ' || INITCAP(DEF.FIRST_NAME) || ' ' || INITCAP(DEF.MIDDLE_NAME) DEFENDANT_NAME,
            DEF.BIRTH_DATE DOB,
            TRIM(DIST.DISTRICT_NAME) DISTRICT_NAME,
            S.DOCKET DOCKET,
            S.DEF_NUM DEF_NUM,
            S.SENT_VIO_DATE SENT_DATE,
            DEF.PACTS_ID PACTS_NUM
    FROM      USSC_CASES.DEFENDANTS DEF,
            USSC_CASES.SENTENCES S,
            LOOKUP.DISTRICTS DIST
    WHERE      DEF.DEF_ID = S.DEF_ID
    AND      S.DIST_ID = DIST.USSC_DISTRICT_ID
    AND     S.CASE_TYPE_CODE = 10
    AND     S.USSC_ID IS NOT NULL
    AND // what i'm trying to do is: DOB, DOCKET, SENT_DATE IN ('X' QUERY), is this possible ??
    ORDER BY DEFENDANT_NAME; thanks in advance.
    I am using Oracle 11g, and sql developer.
    if my approach doesn't work, is there a better approach ?
    Edited by: Rooney on Jul 11, 2012 3:50 PM

    If I got it right, you want to join table USSC_CASES.DEFENDANTS to duplicate rows in USSC_CASES. If so:
    SELECT  INITCAP(DEF.LAST_NAME) || ' ' || INITCAP(DEF.FIRST_NAME) || ' ' || INITCAP(DEF.MIDDLE_NAME) DEFENDANT_NAME,
            DEF.BIRTH_DATE DOB,
            TRIM(DIST.DISTRICT_NAME) DISTRICT_NAME,
            S.DOCKET DOCKET,
            S.DEF_NUM DEF_NUM,
            S.SENT_VIO_DATE SENT_DATE,
            DEF.PACTS_ID PACTS_NUM
      FROM  USSC_CASES.DEFENDANTS DEF,
             SELECT  *
               FROM  (
                      SELECT  S.*,
                              COUNT(*) OVER(PARTITION BY DEF.BIRTH_DATE, S.DOCKET, S.SENT_VIO_DATE) CNT
                        FROM  USSC_CASES.SENTENCES S
               WHERE CNT > 1
            ) S,
            LOOKUP.DISTRICTS DIST
      WHERE DEF.DEF_ID = S.DEF_ID
       AND  S.DIST_ID = DIST.USSC_DISTRICT_ID
       AND  S.CASE_TYPE_CODE = 10
       AND  S.USSC_ID IS NOT NULL
      ORDER BY DEFENDANT_NAME;If you want to exclude duplicates from the query and do not care which row out of duplicate rows to choose:
    SELECT  INITCAP(DEF.LAST_NAME) || ' ' || INITCAP(DEF.FIRST_NAME) || ' ' || INITCAP(DEF.MIDDLE_NAME) DEFENDANT_NAME,
            DEF.BIRTH_DATE DOB,
            TRIM(DIST.DISTRICT_NAME) DISTRICT_NAME,
            S.DOCKET DOCKET,
            S.DEF_NUM DEF_NUM,
            S.SENT_VIO_DATE SENT_DATE,
            DEF.PACTS_ID PACTS_NUM
      FROM  USSC_CASES.DEFENDANTS DEF,
             SELECT  *
               FROM  (
                      SELECT  S.*,
                              ROW_NUMBER() OVER(PARTITION BY DEF.BIRTH_DATE, S.DOCKET, S.SENT_VIO_DATE ORDER BY 1) RN
                        FROM  USSC_CASES.SENTENCES S
               WHERE RN = 1
            ) S,
            LOOKUP.DISTRICTS DIST
      WHERE DEF.DEF_ID = S.DEF_ID
       AND  S.DIST_ID = DIST.USSC_DISTRICT_ID
       AND  S.CASE_TYPE_CODE = 10
       AND  S.USSC_ID IS NOT NULL
      ORDER BY DEFENDANT_NAME;SY.

  • Help with very advanced slideshow using imovie?/idvd?/iphoto?

    I am trying to create a more advanced slideshow for the first time, and I need some advice on how to manage my project and the order in which to use (if to use) the various applications (iphoto, idvd, imovie). I've been in all of them trying to figure out the best format to use, as each of them have certain features I'd like to incorporate into my slideshow. It gets a little confusing since this is all new and I just don't know how to approach it. If anyone has experience with all of these programs, maybe you could give me some suggestions on how to get the most out of what is available. Here is what I'd like to do:
    I have a 4 minutes song from itunes which I want to use with a slide show of about 30 pics (whatever is a reasonable amount).
    FX features (a sound effect at beginning before song and maybe some of the cool video affects on a few of the photos (in addition to Ken Burns )
    Ken Burns zoom like an animated slideshow
    Use a theme (preferably one from idvd as it seems to have more to choose from.
    Since it is only one slideshow, I don't need the confusion of all the zones to import clips into, so I'd like to keep it simple. While I want to keep it simple, I'd like to have some sort of preview in the beginning with the cool stuff imovie offers like the title floating in etc..
    So my problem is, I just don't know how to get all of these affects into one slide show because I'm training myself on bits ad pieces of each one, but I don't where to start (magic imovie, magic idvd, start from scratch idvd, or just slide show to import to idvd). I 've tried them all, but I can't figure a way to get more affects as each one has something different. Not sure if this makes sense, but I've trying so hard to get this right (for a Xmas gift) and I'm going in circles trying to keep it all straight. So, if this is possible, I would really appreciate help as to the best way to approach it. Thank you.
    MacBook1,1   Mac OS X (10.4.8)   using iphoto 6.05, idvd 6.0.3, imovie 6.03

    Hi n
    You have one day more for Your project than in Sweden as Santa has to start
    somewhere and home is close. (We start at about 15.00 24 of dec).
    I would start with - if the music is bought from iTune store (a fix for a known
    problem) to save it out as an audio CD (.aiff) else it will look OK till You try
    Your DVD disk = No sound.
    Then I would start a new iMovie project and from media button select photos
    and drop one start photo from iPhoto down into timeline. Then I would import
    the music from the new CD.
    Cont to put photos one at a time into timeline. Change duration so that they
    match the tempo in Your movie.
    Transitions
    Effects
    etc.
    Save from time to time to keep safe.
    When the "movie" is done - close iMovie and open iDVD and drop Your movie
    project icon into this - or - use the import function in iDVD.
    DON'T Share/Export from iMovie to iDVD - it will destroy Your movie by a bad
    rendering work. iDVD does this so much better.
    I don't know any way to use the "themes" in iDVD into iMovie. Sorry
    Merry Christmas !!!
    Yours Bengt W

  • Need help with Quizzes & Advanced Actions

    Hi, I am relatively new to Captivate (v6) and I am looking for a way to force learners to respond to a question BEFORE navigating to the next page.
    On my question slides, I have a submit button and the next page button but no playbar.
    I want the submit button to be active to provide feedback to the question with the next page arrow inactive. It would be great to have a message pop-up (similar to the incomplete message) when the learner presses on the inactive next page button. Once the question has been answered and submitted, then I want the next page arrow to be active for the learner to navigate to the next page.
    Do I need to create an advanced action for this? Either a standard action or conditional?
    Can anyone help me with this? I would be most appreciative!

    Normally they do not need the Next button, except during Review (if you'll allow that after the last Quiz attempt).
    So my most simple solution is to drag the Next button under the Clear button, it is normally stacked lower so it will be hidden. During Review, the Clear button will not be there and the Next button will become visible.
    Have a look at my blog posts about functionality of Question slides:
    http://lilybiri.posterous.com/question-question-slides-in-captivate
    http://lilybiri.posterous.com/question-question-slides-part-2
    Lilybiri

  • Help with rsnapshot please (mysql)

    Hello, I'm trying to configure rsnapshot to backup my server over ssh.
    I need to backup some directories and mysql dabase.
    So far I've got everything working but the mysql part.
    Its a bit unclear where the problem might be from the logs even with loglevel at 5.
    Right now it just makes empty dumps
    the bit from rsnapshot.conf
    # EXAMPLE.COM
    backup_script /bin/date "+ backup of arch started at %c" unused1
    backup vlad@arch:/home/vlad/public_html/site1/ arch/ +rsync_long_args=--bwlimit=16,exclude=core
    backup vlad@arch:/etc/ arch/ exclude=mtab,exclude=core
    backup_script /home/vladman/backup_mysql.sh vlad@arch "mysqldump -A > /var/db/dump/mysql.sql" unused2
    backup vlad@arch:/var/db/dump/ vlad/
    backup_script /bin/date "+ backup of vlad ended at %c" unused9
    the backup_mysql.sh
    #!/bin/bash
    # backup_mysql.sh
    # by Nathan Rosenquist <[email protected]>
    # http://www.rsnapshot.org/
    # This is a simple shell script to backup a MySQL database with rsnapshot.
    # The assumption is that this will be invoked from rsnapshot. Also, since it
    # will run unattended, the user that runs rsnapshot (probably root) should have
    # a .my.cnf file in their home directory that contains the password for the
    # MySQL root user. For example:
    # /root/.my.cnf (chmod 0600)
    # [client]
    # user = root
    # password = thepassword
    # host = localhost
    # This script simply needs to dump a file into the current working directory.
    # rsnapshot handles everything else.
    # $Id: backup_mysql.sh,v 1.6 2007/03/22 02:50:21 drhyde Exp $
    umask 0077
    # backup the database
    /usr/bin/mysqldump --all-databases > mysqldump_all_databases.sql
    # make the backup readable only by root
    /bin/chmod 600 mysqldump_all_databases.sql
    .my.cnf on local machene
    # /root/.my.cnf (chmod 0600)
    [client]
    user = root
    password = mypassword
    host = localhost
    This is what I have so far...
    Also I think it should be adding dates to folder names? it does not...
    Everything checks out in the sest mode...
    If someone can help I would really appreciate it!
    If you need to see the logs let me know.
    Last edited by Vladman (2009-07-11 16:25:48)

    Take it easy, and read this tutorial
    http://dev.mysql.com/doc/refman/6.0/en/ … overy.html

  • Help with doing SELECT sub query within the SET of an UPDATE statement

    After doing some research, it appears as if it's possible to use a SELECT subquery in the SET of an UPDATE statement.  i did find some examples and here is my code, however when I click the "check" button it's saying the field (my entire select subquery) is unknown and neither in one of the specified tables or defined by a "DATA".  Do I have a syntax issue or is there another reason why it's not taking this as a valid statement?  Thanks for the help!
    LOOP AT IT_DATA
    UPDATE /BIC/AZDP_O0140
       SET /BIC/ZCOUNTER = (SELECT COUNT( DISTINCT MATERIAL )
                            FROM /BIC/AZDP_O0140
                            WHERE MATERIAL EQ IT_DATA-MATERIAL
                            GROUP BY MATERIAL).
    ENDLOOP.

    my Update does indeed have a WHERE clause but because of the issue i'm having, all my criteria in my WHERE is black text in the ABAP editor.  The editor doesn't even recognize the keywords "WHERE" or "EQ".  Below is my entire statement which contains all WHERE criteria in both the Update and the Subquery, i've just removed it for testing to help simplify the query and eliminate as many other factors as posisble that may be causing problems:
    LOOP AT IT_DATA.
       UPDATE /BIC/AZDP_O0140
       SET /BIC/ZCOUNTER = (SELECT COUNT( DISTINCT MATERIAL ) FROM /BIC/AZDP_O0140
       WHERE WHSE_NUM EQ IT_DATA-WAREHOUSE
        AND  PLANT EQ IT_DATA-PLANT
        AND  /BIC/ZTRAN_NO EQ IT_DATA-TRANS_NUM
        AND  DELIV_NUMB EQ IT_DATA-DELIVERY
        AND  MATERIAL EQ IT_DATA-MATERIAL
        GROUP BY MATERIAL)
       WHERE WHSE_NUM EQ IT_DATA-WAREHOUSE
        AND  PLANT EQ IT_DATA-PLANT
        AND  /BIC/ZTRAN_NO EQ IT_DATA-TRANS_NUM
        AND  DELIV_NUMB EQ IT_DATA-DELIVERY
        AND  MATERIAL EQ IT_DATA-MATERIAL.
    ENDLOOP.
    i should also mention the sources i found were not within the SAP Library but instead on other third-party ABAP websites.  so because i was having issues i wanted to post here to see if anyone else has come up with a working solution.  but if this cannot be done i can likely come up with a solution for my needs using multiple internal tables, this would just have been much easier since i can get a query like this to do what i want in SQL Server.  Thought i could utilize this in ABAP as well.

  • Need Help with Creating the SQl query

    Hi,
    SQL query gurus...
    INFORMATION:
    I have two table, CURRENT and PREVIOUS.(Table Defs below).
    CURRENT:
    Column1 - CURR_PARENT
    Column2 - CURR_CHILD
    Column3 - CURR_CHILD_ATTRIBUTE 1
    Column4 - CURR_CHILD_ATTRIBUTE 2
    Column5 - CURR_CHILD_ATTRIBUTE 3
    PREVIOUS:
    Column1 - PREV_PARENT
    Column2 - PREV_CHILD
    Column3 - PREV_CHILD_ATTRIBUTE 1
    Column4 - PREV_CHILD_ATTRIBUTE 2
    Column5 - PREV_CHILD_ATTRIBUTE 3
    PROBLEM STATEMENT
    Here the columns 3 to 5 are the attributes of the Child. Lets assume that I have two loads, One Today which goes to the CURRENT table and one yesterday which goes to the PREVIOUS table. Between these two loads there is a CHANGE in the value for Columns either 3/4/5 or all of them(doesnt matter if one or all).
    I want to determine what properties for the child have changed with the help of a MOST efficient SQL query.(PARENT+CHILD is unique key). The Database is ofcourse ORACLE.
    Please help.
    Regards,
    Parag

    Hi,
    The last message was not posted by the same user_name that started the thread.
    Please don't do that: it's confusing.
    Earlier replies give you the information you want, with one row of output (maximum) per row in current_tbl. There may be 1, 2 or 3 changes on a row.
    You just have to unpivot that data to get one row for every change, like this:
    WITH     single_row  AS
         SELECT     c.curr_parent
         ,     c.curr_child
         ,     c.curr_child_attribute1
         ,     c.curr_child_attribute2
         ,     c.curr_child_attribute3
         ,     DECODE (c.curr_child_attribute1, p.prev_child_attribute1, 0, 1) AS diff1
         ,     DECODE (c.curr_child_attribute2, p.prev_child_attribute2, 0, 2) AS diff2
         ,     DECODE (c.curr_child_attribute3, p.prev_child_attribute3, 0, 3) AS diff3
         FROM     current_tbl    c
         JOIN     previous_tbl   p     ON  c.curr_parent     = p.prev_parent
                                AND c.curr_child     = p.prev_child
         WHERE     c.curr_child_attribute1     != p.prev_child_attribute1
         OR     c.curr_child_attribute2     != p.prev_child_attribute2
         OR     c.curr_child_attribute3     != p.prev_child_attribute3
    ,     cntr     AS
         SELECT     LEVEL     AS n
         FROM     dual
         CONNECT BY     LEVEL <= 3
    SELECT     s.curr_parent     AS parent
    ,     s.curr_child     AS child
    ,     CASE     c.n
              WHEN  1  THEN  s.curr_child_attribute1
              WHEN  2  THEN  s.curr_child_attribute2
              WHEN  3  THEN  s.curr_child_attribute3
         END          AS attribute
    ,     c.n          AS attribute_value
    FROM     single_row     s
    JOIN     cntr          c     ON     c.n IN ( s.diff1
                                    , s.diff2
                                    , s.diff3
    ORDER BY  attribute_value
    ,            parent
    ,            child
    ;

Maybe you are looking for

  • My nano SIM works in my Nokia mobile phone but "No SIM" when in my iPad mini

    I've been around the support loop a few times with varying levels of success, here is my story. Basically I expect to only occasionally require mobile data services so would like to move my nano SIM from my Nokia mobile phone to the iPad mini as and

  • PDF page cannot be counted

    hi, i have a problem while counting the pages for a PDF file. Note: The pdf file size is more than 1.5 GB. if the pdf size with in 1 MB then there is no problem, if it's size is 1.5 GB then only we are getting following error. Error message : Excepti

  • How do I backup to a specific device at an specific moment?

    Here is what I want to do: - Any night of any day in the week, connect my external HDD to my Arch computer, and go to sleep. - At the next morning there is a backup done on that HDD. I understand the basics on some tools which can help me do that (cr

  • IPhoto pictures disappears

    Since the last uppgrade Drop Box wants to import all my pictures. I choosed not to do that when upgrading. SInce then I can see all my pictures in iPhoto, but in a few seconds almost all photos disappear. I´ve got at backup copy where all photos toda

  • Adding photos from iPad to computer

    I have 2 iPads and 2 iPhones. My wife has sync'd her iPad on her laptop and now when I try to get her iPad to sync photos on the desktop it says that it would replace her photos. How can I get all of her photos on her iPad to get on my desktop?