473,320 Members | 1,933 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,320 software developers and data experts.

select query + insert query + MS ACCESS

Hallo everyone,

I have two tables in the database table1(col1,col3,col2) and table2(col1, col2). First of all i will have to select col2 from database and for each and every value of col2 i need o make an insert query in the table1(..,..,col2).

It will be helpful for me if anyone call solve this problem for me.

aravind.s
May 12 '06 #1
2 10823
cweiss
36
This should do it:

Expand|Select|Wrap|Line Numbers
  1. INSERT INTO Table1 ( Col2 )
  2. SELECT Col2
  3. FROM Table2.Col2;
May 12 '06 #2
Last question

Appending the query works :) however, In the form, i wanted to contain multiple textboxes that submits to the same field. However, when i start adding info to the text box, all other bounded textboxes for the same field will be mirrored.

Is there any way around this?
Jun 22 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Phil Powell | last post by:
$sql = 'INSERT INTO fs_usermetadata (' . substr(trim($cols), 0, strrpos(trim($cols), ',')) . ') VALUES (' . substr(trim($values), 0, strrpos(trim($values), ',')) . ')'; if (!mysql_query($sql))...
3
by: foldface | last post by:
Hi I have a dynamically constructed sql query that I want to execute, e.g. exec('select * from ' + @tablename) (1) Can I suppress the output somehow if this returns no values? (2) Can I use the...
2
by: Edwinah63 | last post by:
Hi Everyone, All the very best for 2004!! i need urgent help with this problem, the users are about to skin me alive!! we have an access front end with linked to sql server 2k tables. ...
0
by: jtocci | last post by:
I'm having a big problem with CREATE RULE...ON INSERT...INSERT INTO...SELECT...FROM...WHERE when I want to INSERT several (20~50) records based on a single INSERT to a view. Either I get a 'too...
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
2
by: JMCN | last post by:
Here is a simple question regarding insert into and select insert into statements. I have the follwing sql from my table make query. how can i add other query with the same field names as tbl1? ...
3
by: Sagi | last post by:
if i use the insert to add a new row to the access database, something like: INSERT INTO tblCat (CatName,CatOrder,StoreID) VALUES( '" & strNewCat&"', "& strMaxiO& ", 1); and there is another...
4
by: nsikkandar | last post by:
Greetings, I am in need of getting "Auto Generated Number" of Primary Key from master table (I am, using Access) when I insert a row through ADO.NET from VB.NET. Based on this ID, I want to...
5
by: john | last post by:
In this single-user app I have a form with members. In the related table I have a field 'Select' with which the user can select a record. I have two buttons on the form (All and None) that select...
2
by: paulmitchell507 | last post by:
I think I am attempting a simple procedure but I just can't figure out the correct syntax. My asp (classic) page runs a SELECT query to obtain dates and ID's from 2 tables uSQL = "SELECT...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.