473,786 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Breaking out Telephone Ranges

Hi,

I am in need of some assistance. I have a table with the following:
Tel_St_Range Tel_End_Range Customer Name
6075551200 6075551300 Tom Smith

I would like to know how to break out the ranges into a new table that
looks like this:
Telephone Customer Name
6075551200 Tom Smith
6075551201 Tom Smith
6075551202 Tom Smith
.............
6075551300 Tom Smith

Can anyone assist? I would really appreciate it.

Thanks,

Sep 28 '07 #1
3 1562
"Sm******@aol.c om" <Sm******@aol.c omwrote in
news:11******** **************@ y42g2000hsy.goo glegroups.com:
Hi,

I am in need of some assistance. I have a table with the
following: Tel_St_Range Tel_End_Range Customer Name
6075551200 6075551300 Tom Smith

I would like to know how to break out the ranges into a new table
that looks like this:
Telephone Customer Name
6075551200 Tom Smith
6075551201 Tom Smith
6075551202 Tom Smith
............
6075551300 Tom Smith

Can anyone assist? I would really appreciate it.

Thanks,
Easy in VBA.Paste into a module, change SRCE and DEST as required,
then debug.

Dim rsFrom as DAO.recordset
Dim RsTo as DAO.recordset.
Dim Srce as string
Dim Dest as string
Dim lngCounter as long
SRCE = "name of source table"
DEST = "Name of new table"

set rsFrom = dbOpenRecordset (SRCE)
set rsTo = dbOpenRecordset (DEST)

Do while not rsFrom.EOF
For lngCounter = rsfrom!Tel_St_R ange to rsfrom!Tel_End_ Range
rsTo.addnew
rsto!Telephone = lngCounter
rsto![Customer Name] = rsFrom![Customer Name]
rsto.update
next
rsFrom.movenext
loop
Rsfrom.close
rsto.close

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Sep 28 '07 #2
On Sep 28, 11:41 am, Bob Quintal <rquin...@sPAmp atico.cawrote:
"Smyth...@aol.c om" <Smyth...@aol.c omwrote innews:11****** *************** *@y42g2000hsy.g ooglegroups.com :


Hi,
I am in need of some assistance. I have a table with the
following: Tel_St_Range Tel_End_Range Customer Name
6075551200 6075551300 Tom Smith
I would like to know how to break out the ranges into a new table
that looks like this:
Telephone Customer Name
6075551200 Tom Smith
6075551201 Tom Smith
6075551202 Tom Smith
............
6075551300 Tom Smith
Can anyone assist? I would really appreciate it.
Thanks,

Easy in VBA.Paste into a module, change SRCE and DEST as required,
then debug.

Dim rsFrom as DAO.recordset
Dim RsTo as DAO.recordset.
Dim Srce as string
Dim Dest as string
Dim lngCounter as long
SRCE = "name of source table"
DEST = "Name of new table"

set rsFrom = dbOpenRecordset (SRCE)
set rsTo = dbOpenRecordset (DEST)

Do while not rsFrom.EOF
For lngCounter = rsfrom!Tel_St_R ange to rsfrom!Tel_End_ Range
rsTo.addnew
rsto!Telephone = lngCounter
rsto![Customer Name] = rsFrom![Customer Name]
rsto.update
next
rsFrom.movenext
loop
Rsfrom.close
rsto.close

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account fromhttp://www.teranews.co m- Hide quoted text -

- Show quoted text -
Bob,

You are the BOMB!!! Thank you so much.
Sep 28 '07 #3
"Sm******@aol.c om" <Sm******@aol.c omwrote in
news:11******** **************@ o80g2000hse.goo glegroups.com:
>
Bob,

You are the BOMB!!! Thank you so much.
Careful, now DHS will want to track me as a terrorist. :-)
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Sep 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

87
6473
by: Frances Del Rio | last post by:
is there a non-breaking hyphen in HTML?? for example, so a phone no. falls all on one line.. as in.. 1-800-444-5454... (and is not broken into two lines if phone no. occurs near end of a line..) (searched for 'hyphen' in FAQ pg, didn't find anything..) thank you.. Frances
2
1724
by: Ben O'Steen | last post by:
Scenario: ========= Using PyGame in particular, I am trying to write an application that will run a scripted timeline of events, eg at 5.5 seconds, play xxx.mp3 and put the image of a ball on screen, at 7.8 seconds move the ball up and down. At this point, I hear you say 'Oh, like Flash'. Yes, well... Like Flash, but I don't want to take this app in the same direction as Macromedia took Flash, nor do I (ever) want the two to be
150
6586
by: tony | last post by:
If you have any PHP scripts which will not work in the current releases due to breaks in backwards compatibility then take a look at http://www.tonymarston.net/php-mysql/bc-is-everything.html and see if you agree with my opinion or not. Tony Marston http://www.tonymarston.net
67
7711
by: PC Datasheet | last post by:
Transaction data is given with date ranges: Beginning End 4/1/06 4/4/06 4/7/06 4/11/06 4/14/06 4/17/06 4/18/06 4/21/06 426/06 4/30/06 I am looking for suggestions on how to find the date ranges where there were no transactions.
3
3339
by: Beowulf | last post by:
I have data coming from a telephony system that keeps track of when an employee makes a phone call to conduct a survey and which project number is being billed for the time the employee spends on that phone call in a MS SQL Server 2000 database (which I don't own). The data is being returned to me in a view (see DDL for w_HR_Call_Log below). I link to this view in MS access through ODBC to create a linked table. I have my own view in...
3
1503
by: Bob Milutinovic | last post by:
Greetings, folks. Wondering if someone might be able to shed some light on this without my having to load up 'n test it for myself. I have a page calling another with Server.Execute, but depending on what the outcome of some data checks on that called page is, it may need to "break out" of the call with a Response.Redirect. What I want to know is, will this eventually lead to memory leaks because
3
1529
by: Snedker | last post by:
Hi there, I really need some input of how to approach my little assignment. A customer wants to exclude all US IP-ranges from accessing part of his website. From http://www.ipaddresslocation.org/ I've collected about 16,000 ranges in the format 208.202.120.0 208.203.111.255 208.203.114.0 208.203.244.127
7
10267
by: guido | last post by:
Hi, I'm looking for a container class that can map whole ranges of keys to objects - something like std::map, but not only for individual values for the key, but for whole ranges. Example: I want to be able to tell the container to return object a for every given key between 0 and 10, object c for every key between 11 and 500000 and object c for every key between 500001 and 599999, without having to
0
9496
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.