DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005

    Enquiry from two different tables

    Hi All,

    Now I want to make queries from two different tables in my db which is only linkage with EMAILADD. i.e both table have EMAIL Address field pointing to same customer.
    Table A
    ProductID Order_Date EMAIADD

    Table B
    CustomerID EMAILADD Customer_Type

    So above Table A and B I want some product detail of ordered by customer_type of Corporate during April 2005.

    Do I need to write program for this purpose?


  2. #2
    Join Date
    Aug 2002
    Colorado Springs
    You need to write a SQL query that joins the two tables. For example ...
    select customer_type, ProductID, Order_Date
    from table_a a, table_b b
    where a.emailadd = b.emailadd
    and order_date >= to_date('01-oct-2005')
    and order_date < to_date('01-nov-2005')
    order by customer_type
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width