Question: how to generate a range between numbers?
January 23rd, 2008 By bssa
Given this input:
operator_name numbers loc ------------------------------------------------------- sony 9848930997-9848931000 pune o2 65432-65435 hyd voda 369852-369855 mum orange 9290988345-9290988345 blore
How to write a query to retrieve the data like this:
operatorname numbers loc ---------------------------------------------------------- sony 9848930997 pune sony 9848930998 pune sony 9848930999 pune sony 9848931000 pune o2 65432 hyd o2 65433 hyd o2 65434 hyd o2 65435 hyd voda 369852 mum voda 369853 mum voda 369854 mum voda 3698525 mum orange 9290988345 blore
Thanks for your help.

January 24th, 2008 at 6:47 am
Ok, so I have a table that looks like this:
And, my input dataset looks like this:
One solution, though I’m not convinced it’s optimal, is this: