473,465 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Create 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 1540
"Sm******@aol.com" <Sm******@aol.comwrote in
news:11**********************@y42g2000hsy.googlegr oups.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_Range 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...@sPAmpatico.cawrote:
"Smyth...@aol.com" <Smyth...@aol.comwrote innews:11**********************@y42g2000hsy.google groups.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_Range 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.com- Hide quoted text -

- Show quoted text -
Bob,

You are the BOMB!!! Thank you so much.
Sep 28 '07 #3
"Sm******@aol.com" <Sm******@aol.comwrote in
news:11**********************@o80g2000hse.googlegr oups.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
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...
2
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...
150
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...
67
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 ...
3
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...
3
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...
3
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...
7
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.