Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: zon
Hi,
I have a table with CDR (Call Detail Records or Calls) of my customers. I've another table that tells me witch pack/product customer had.
-----------------------------------
Imagine the following two calls made by the same customer:
First Call
Customer Billing Account - 899999999
Telephone Instance ID - 1-99ABCD9
Date - 31-01-2011 11:35:22
Duration - 110 seconds
Second Call
Customer Billing Account - 899999999
Telephone Instance ID - 1-99ABCD9
Date - 01-02-2011 12:02:05
Duration - 50 seconds
Now imagine that this customer change pack/product in the last day of January. He had Nights Phone from 01-01-2011 until 31-01-2011 23:59:59 but he changed to Unlimited Phone from that date on. So in my pack/products table I'll have two lines:
First Line
Customer Billing Account - 899999999
Telephone Instance ID - 1-99ABCD9
Initial Date - 01-01-2011 00:00:00
End Data - 31-01-2011 23:59:59
Product Desc - Nights Phone
Second Line
Customer Billing Account - 899999999
Telephone Instance ID - 1-99ABCD9
Initial Date - 01-02-2011 00:00:00
End Data - 31-12-3500 23:59:59
Product Desc - Unlimited Phone
------------------------
What I want is to know what was customer's product while he made those two calls. I tried to use node lookup, but I need to use more than just the key, I need to validate if call data is between the product inicial and end date. Can someone help me with that?
Best Regards,
ZON