473,394 Members | 1,869 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.

Insert data into 6 different tables

Hi5
Hi,

Any Idea how, I can make an Insert statement to insert data into 6
different tables, that are all holding all data of my database?

Is there any example?

I would be grateful if you could let me know of the ways to view data
in a query and then add data to database

Many thanks

Nov 13 '05 #1
9 6552
Helpful answers require one or more of the following:

1. A Clear and Complete Question with background sufficient that we
have a clue about what you are talking;
2. A Lucky Guess;
3. A Responder who is at the same stage of bewilderment as the poster.

The third may not lead to long term gain.

Nov 13 '05 #2
Hi5
Well Here is the my data tables:
1-Client
2-CChar
3-Category
4-Desc
5-Info
6-Other info (Optional)

relation ships are as follows:
Client 1 to many Ccahr
CLIENT 1 to many info
Info many to 1 to Desc
Cchar 1to many to Info
Cchar many to 1 to category

Now I sopuse the info is more or less soficient!!

Could you plaese help ma?

Many Thanks

Access newbie

Nov 13 '05 #3
Hi5 wrote:
Hi,

Any Idea how, I can make an Insert statement to insert data into 6
different tables, that are all holding all data of my database?


An INSERT statement will insert into just one table, in the reach of my
knowledge.
If the table structure is the same, you made a design error that must be
corrected.

--
Bas Cost Budde, Holland

Nov 13 '05 #4
Hi5 wrote:
Any Idea how, I can make an Insert statement to insert data into 6
different tables, that are all holding all data of my database?


No, an insert statement has a structure such that you insert into ONE table.

You will need six separate statements with criteria to make sure that
you get six separate sets of data.

However, if these six tables have the same data structure, it would be
silly in the extreme to have six separate tables.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #5
Hi5
Hi,
Many thanks for your answer, Of course the datasets are different.
we have the Primary and foriegn keys that are numbers and are the same
in all realated tables,to make it simple I.E.
I need to input client from a dropdown and category from a text box in
one go is there any way of doing that?
many thanks

Nov 13 '05 #6
I cannot think of a way to update or insert into multiple tables
related as many to one.
Typically in Access we use a forms and subforms to edit sych a
relation. I don't use subforms per se, but I believe that six is more
than the Access limit.
Regardless, SQL Insert Statements are very efficient, and running off
six in succession should be almost instantaneous.

Nov 13 '05 #7
Hi5 wrote:
Hi,
Many thanks for your answer, Of course the datasets are different.
we have the Primary and foriegn keys that are numbers and are the same
in all realated tables,to make it simple I.E.
I need to input client from a dropdown and category from a text box in
one go is there any way of doing that?
many thanks


Are you talking here about inputting the client that is chosen from the
drop down - "combo box" in Access - and whatever is in the text box into
a table, as a a single record?

Or, does the client from the combo box tell you what table the text box
needs to made a record of?

Or, will the client choice in the combo box specify what records from
another table need to be inserted into a specific table?

The way to do this is in code, associated with a command button, that
writes the SQL statement you need and the executes it. You can figure
out how to write the SQL statement by setting one up on the Access query
design window and then switching to SQL View (Click View->SQL View).
Copy the SQL and break it up to put in values from the text box and the
combo box in the appropriate places.

If you're not sure how to write the code, respond back with an answer on
the questions I make above and I'll try to show you how to do this -
enough at least, to set you on your way! 8)
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #8
"ly******@yahoo.ca" <ly******@yahoo.ca> wrote in
news:11*********************@f14g2000cwb.googlegro ups.com:
I cannot think of a way to update or insert into multiple tables
related as many to one.
Typically in Access we use a forms and subforms to edit sych a
relation. I don't use subforms per se, but I believe that six is
more than the Access limit.
Regardless, SQL Insert Statements are very efficient, and running
off six in succession should be almost instantaneous.


And likely should be wrapped in a transaction.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #9
Hi5
Hi,
Yes some data is to be selected from drop down and some fields are to
be filled by typing the data in.
That's very kind if you can show me how to code both of them
many thankls

Nov 13 '05 #10

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

Similar topics

1
by: Pesko S | last post by:
Hi, Could anybody just point me in a direction where I can find information on how the heck I can update a database with relational data from an XML file. I use stored procedures to insert...
5
by: Paul Shaw | last post by:
Can anyone explain why an insert might cause multiple logical bufferpool data reads? Here's a situation that has me scratching my head. Table A's data resides in tablespace B Table A's...
16
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the...
8
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
8
by: carlospedr | last post by:
I have to insert data from about 30 tables into a single table (Users), to do so i used a cursor and a bit of dynamic sql, this should work fine if the tables have to do the select from had the...
9
by: David Eades | last post by:
Hi all Complete newbie here, so apologies if this is the wrong forum. I've been asked to use mysql and asp to make a simple bidding system (rather like a simple ebay), whereby users can use a...
8
by: nano2k | last post by:
Hi Shortly, I keep invoices in a table. Occasionally, someone will fire the execution of a stored procedure (SP) that performs several UPDATEs against (potentially) all invoices OLDER than a...
21
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement...
3
by: iKiLL | last post by:
Hi all I am having problems getting my SqlCeDataAdapter to Update the SQL Mobile Data base. i am using C# CF2. I have tried this a number of different ways. Starting with the command builder...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...

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.