russellobrien
Programmer
Help!
I have 2 tables, the first a "customer" with relevant details. I have a second table listing customer "calls". Some will have called, some not.
I need to join the tabel such that I create a column on the end of the customer details that says whether there was a call or not (and also it picks the earliest call date)
i.e:
CUSTOMER
NAME DETAILS
jon seattle
bob london
bill berlin
etc
CALLS
NAME DATE
jon 1/1/2004
jon 3/1/2004
bob 22/11/2003
which returns
CALLS_FROM_CUSTOMERS
NAME DETAILS CALL(y/n) DATE(if y)
jon seatlle y 1/1/4
bob london y 22/11/3
bill berlin n NULL
Any help much appreciated.
Russell
I have 2 tables, the first a "customer" with relevant details. I have a second table listing customer "calls". Some will have called, some not.
I need to join the tabel such that I create a column on the end of the customer details that says whether there was a call or not (and also it picks the earliest call date)
i.e:
CUSTOMER
NAME DETAILS
jon seattle
bob london
bill berlin
etc
CALLS
NAME DATE
jon 1/1/2004
jon 3/1/2004
bob 22/11/2003
which returns
CALLS_FROM_CUSTOMERS
NAME DETAILS CALL(y/n) DATE(if y)
jon seatlle y 1/1/4
bob london y 22/11/3
bill berlin n NULL
Any help much appreciated.
Russell