Paul,

Based on your original post, I'd have to agree with Brian. That query
should work. In fact, something as simple as this should work too:


    select
       order.order_id
    from
        order
        ,transaction_log 
    where 
          order.order_id = transaction_log.order_id 
    and transaction_log.event_log_id <> 3
    group by 
        order.order_id


Perhaps you could share your table designs and some sample records? 

Shashank


Sql, query


 

  < ORIGINAL REQUEST >


   | | I have an order table and a transaction log table. The 
    | order table has 
    | | an order_id and a number of other columns that are not 
    | germain to my
    | question.
    | | The transaction log has an order_ID and an event_log_id 
    | column. The 
    | | order
    | id
    | | from the order table will have a one to many 
    | relationship to the 
    | | order_id data in the transaction log table. The 
    | event_log_id is an 
    | | integer that assumes a value of 1 if the credit card is 
    | authorized, a 
    | | value of 2 if the credit card is denied or some other 
    | type of error, 
    | | and a value of 3 if the credit card is delay captured.
    | |
    | | I need to create a query that would return all of the 
    | order.order_ids 
    | | that are authorized but have not been delayed captured. 
    | How can I 
    | | accomplish
    | this
    | | task?
    | |


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to