Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column w/ Multiple Issues

Status
Not open for further replies.

OU18

Programmer
Aug 22, 2001
102
US
Hi all,

I have an issue with some data that is sent to me from another company. I work in telecom, and we recv rate changes from vendors. Some weekly, some daily, some monthly. There really is no rhyme or reason to the way they come in.

The issue I am running into is, there are multiple vendors that like to send their data in the following format.

table name - tblInternationalRates

this is an example
Country NPA Country Code CityCode
UK 44 207,208
UK 44 7903,7904,7905

What we need to do is take the City code column and create a new record for each Code. So instead of the above you would have

Country NPA Country Code City Code
UK 44 207
UK 44 208
UK 44 7903
UK 44 7904
Etc.

We have tried to get the vendors to send in this format, but there is alot of resistance. We need to change the data to the format our Billing Platform can use.

Thanks for the help

 
Hi, kind of hard to tell if this is appropriate for your example, but you might play around with a union query. Something like:

SELECT tbl1.Country,tbl1.CountryCode,tbl1.NPA
FROM tbl1
UNION Select tbl1.country, tbl1.citycode,tbl1.NPA from tbl1;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top