473,394 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Creating Tables from a grouped recordset

I have done something like this a million years ago my developer skills have diminished to nothing but now I am at a new job trying to regroup what I lost. This one came across my desk recently.

I need to create tables based on grouped recordsets the additional challenge is that the table name would equal the value or variable of the grouped recordset. Example below

Field_1 Field_2 Field_3
em***@email.com Boston MA
em****@email2.com Boston MA
em****@email3.com NY NY
em****@email4.com NY NY

In this case I would need an automated procedure to create two tables based on the grouped recordset in field 3. So one table called MA and one table called NY. In my app the values in Field3 are always variable so that eliminates using fixed names.

The last time I did this we used a Do while procedure declaring the variable calling the recordset with a SQl string. For some reason I just can't piece this together.

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
2 1883
Chris,
Why bother with a database in that case? Access and other similar database
software is really designed as a container for information that has defined
and unchanging attributes and entities. Were I the architect of your
database I'd say you had three attributes of your entity. The first is
e-mail address, the second is City, and the third is State.
But, you can create tables from any select statement using SELECT . . .
INTO . . . FROM . . . It's documented in the help files if you look for
it.
The way it sounds, though, you don't really need a relational database but
perhaps should be creating data files in VB that do what you want.
"Chris via AccessMonster.com" <fo***@AccessMonster.com> wrote in message
news:b6******************************@AccessMonste r.com...
I have done something like this a million years ago my developer skills
have diminished to nothing but now I am at a new job trying to regroup what
I lost. This one came across my desk recently.

I need to create tables based on grouped recordsets the additional
challenge is that the table name would equal the value or variable of the
grouped recordset. Example below

Field_1 Field_2 Field_3
em***@email.com Boston MA
em****@email2.com Boston MA
em****@email3.com NY NY
em****@email4.com NY NY

In this case I would need an automated procedure to create two tables
based on the grouped recordset in field 3. So one table called MA and one
table called NY. In my app the values in Field3 are always variable so
that eliminates using fixed names.

The last time I did this we used a Do while procedure declaring the
variable calling the recordset with a SQl string. For some reason I just
can't piece this together.

--
Message posted via http://www.accessmonster.com

Nov 13 '05 #2
Thanks for the quick response

I know what you are saying but perhaps I should be more specific of why I need to attempt this in Access. The tables or files I am trying to create are the source for a List Manager that displays these emails on the web the page is looking at a SQL server.

The list comes from Access and that is the only tool available to me right now... This is the reason I am doing it this way. I have done the same thing recently but have relied on DTS in SQL Enterprise manager, however that tool is not available to me right now. Also I have to compress this infromation as email addresses are duplicated several times and there are other variables involved.

So let me try to simplify the need the table creation should be automated based on the group variable with the name of the table being the same variable as the goup.

It's not the creating a table based on grouped records that I am having the problem with. It's the automation and using the grouping as well as (in example case Field 3) as the variable that automatically becomes the table name

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

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

Similar topics

4
by: Ken Fine | last post by:
Using ASP, I want to display a series of records grouped by nested years and months, e.g.: 2004 December Record1 Record2 Record3 November Record4
3
by: Bruno Luis | last post by:
Hello I'm using A97 and i'm having some trouble with creating a recordset with data from two different databases. I connect to a remote database and make this data the default source for my...
3
by: Phil Rutter | last post by:
Hello All, I have about 700 word documents that have 2 tables one is static 4 colums x 5 rows the other is 5 colums x rows ranging from 2 to 100 what i wolud like to do is open the word doc....
5
by: Ilan Sebba | last post by:
When it comes to adding records in related tables, Access is really smart. But when I try to do the same using ADO, I am really stupid. Say I have two parent tables (eg Course, Student) and one...
6
by: F-13 | last post by:
I'm working on a BOM in Access 200 from an example downloaded from from the web. The sample database contains three tables, Assemblies (the list of items needed to assemble any assembly),...
3
by: Richard Thornley | last post by:
Hello, I need some clarification in creating objects. Consider the following code... (note: The function InitializeListCombo initializes the combobox) Private daLists As New...
0
by: EiEiO | last post by:
Hello all. I am hoping I could get some suggestions on moving forward. My Challenge: Importing data from one table to another where the field names almost never match. My Form has a list...
3
by: emajka21 | last post by:
Hello, and thank you in advance for trying to help me. I am trying to create an access 2000 form without using the wizard. It just doesn't seem like I can the level of complexity I want out of the...
4
by: Constantine AI | last post by:
Hi I am trying to input some error messages into my system. I have come across a slight problem with one of them. i have a query which filters and groups data together displaying details on a form. I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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...
0
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...
0
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...

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.