Enquiry from two different tables
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.
ProductID Order_Date EMAIADD
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?
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
Click Here to Expand Forum to Full Width