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

insert into many rows

i have a table with about 40 columns in access 97( terrible i knw, but
its not mine and im not allowed normalize or change it) . i have added
a column , which is a number , called year. it will contain 1997,
1998, etc. there are about 1600 rows in the table. is there anything
like a correlated sub query that will allow me to insert this into the
date column of each row??
Jul 20 '05 #1
2 1810

"fguihen" <sc*******@yahoo.co.uk> wrote in message
news:ad**************************@posting.google.c om...
i have a table with about 40 columns in access 97( terrible i knw, but
its not mine and im not allowed normalize or change it) . i have added
a column , which is a number , called year. it will contain 1997,
1998, etc. there are about 1600 rows in the table. is there anything
like a correlated sub query that will allow me to insert this into the
date column of each row??


Since this seems to be an Access question, you will probably get a better
answer in an Access newsgroup.

Simon
Jul 20 '05 #2
Hi

You desciption is not clear as to what you really want. At a guess you are
thinking about a derived table such as

SELECT * FROM
( SELECT 1997 as Year, Col1, Col2, Col3
FROM X ) X

There is no indication how you create the year so if it is dependent on
other columns then

SELECT * FROM
( SELECT CASE Col1 = 'A' THEN 1997 ELSE 1998 END as Year, Col1, Col2, Col3
FROM X ) X

In access you could create a query instead of the derived table and select
from that, instead of using CASE use IIF.
John

"fguihen" <sc*******@yahoo.co.uk> wrote in message
news:ad**************************@posting.google.c om...
i have a table with about 40 columns in access 97( terrible i knw, but
its not mine and im not allowed normalize or change it) . i have added
a column , which is a number , called year. it will contain 1997,
1998, etc. there are about 1600 rows in the table. is there anything
like a correlated sub query that will allow me to insert this into the
date column of each row??

Jul 20 '05 #3

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

Similar topics

3
by: Jason | last post by:
The best way to explain this is by example. I have a source table with many columns. Source SYMBOL EXCHANGE_NAME CUSIP TYPE ISSUE_NAME
6
by: Karen Middleton | last post by:
In MS Access I can do in one SQL statement a update if exists else a insert. Assuming my source staging table is called - SOURCE and my target table is called - DEST and both of them have the...
9
by: Martin | last post by:
Hello, I'm new with triggers and I can not find any good example on how to do the following: I have two tables WO and PM with the following fields: WO.WONUM, VARCHAR(10) WO.PMNUM,...
9
by: Curtis Stanford | last post by:
I'm in a situation where I need to load an ASCII file into a database. No sweat so far right? The records are indexed by date and I have a unique index on date. The ASCII can overlap, meaning it...
2
by: harborboy76 | last post by:
Hi, I had posted one topic earlier, but somehow the link has been broken and I cannot see the topic. So sorry if this is a duplicate topic for some. Here is the issue that I'm running into....
4
by: RG | last post by:
Using VB.NET, How do I insert rows from a SQL Server table into an Access table with the same structure (and also the reverse, from Access to SQL)? I’m new to this, so here’s what I’ve...
11
by: Sezai YILMAZ | last post by:
Hello I need high throughput while inserting into PostgreSQL. Because of that I did some PostgreSQL insert performance tests. ------------------------------------------------------------ --...
2
by: wombat53 | last post by:
Hi Group Are there any DB2 UDB ESE DPF V8.2 users exploiting "buffered inserts" (BIND parm INSERT BUF) *and* "multi-row INSERTS" (many rows associated with the VALUES clause of the INSERT to...
4
by: Michel Esber | last post by:
Hello, Environment: db2 V8 FP 13 LUW Our application currently uses: insert into table values ('A'),('B'),...('Z') We have used CLI arrays inserts (1000 array and commit size) and...
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...
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.