A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

update all records in table



 
 
Thread Tools Display Modes
  #1  
Old July 16th, 2008, 05:36 PM posted to microsoft.public.access.queries
APINDARA
external usenet poster
 
Posts: 2
Default update all records in table

I have a table that contains 80,000 records and want to add a field that I
can use to note year and location of receipt of record.

Something like 2004AB or 2007APR

Kindof a neophite with Update queries and cant figure out how to make this
relatively simple thing happen.

thanks in advance!

  #2  
Old July 16th, 2008, 05:51 PM posted to microsoft.public.access.queries
Klatuu
external usenet poster
 
Posts: 7,074
Default update all records in table

It is a good thing you have not gotten it done yet.
Now, you can get it done correctly.
The problem is you should be using two fields. One for the year and one for
the location. They are separate pieces of data. When you combine them, you
seriously reduce your ability to find specific information. In addition,
your queries will become more complex with the two items combined.

The YearReceived field should be a Long Integer numberic field and the
RecordLocation field should be a text field.

As to your Update query question, how will you know what values to put in
what records?
--
Dave Hargis, Microsoft Access MVP


"APINDARA" wrote:

I have a table that contains 80,000 records and want to add a field that I
can use to note year and location of receipt of record.

Something like 2004AB or 2007APR

Kindof a neophite with Update queries and cant figure out how to make this
relatively simple thing happen.

thanks in advance!


  #3  
Old July 16th, 2008, 05:54 PM posted to microsoft.public.access.queries
Michel Walsh[_2_]
external usenet poster
 
Posts: 56
Default update all records in table

You need a data definition language statement, or, much simpler, use the
table design and add a column to your table.

An update query can only modify values. It does not change the structure of
the table(s).


Vanderghast, Access MVP


"APINDARA" u44873@uwe wrote in message news:873dc535b094e@uwe...
I have a table that contains 80,000 records and want to add a field that I
can use to note year and location of receipt of record.

Something like 2004AB or 2007APR

Kindof a neophite with Update queries and cant figure out how to make this
relatively simple thing happen.

thanks in advance!


  #4  
Old July 16th, 2008, 05:56 PM posted to microsoft.public.access.queries
APINDARA
external usenet poster
 
Posts: 2
Default update all records in table

Each record has a segment code that I can see what season the name came from.

Klatuu wrote:
It is a good thing you have not gotten it done yet.
Now, you can get it done correctly.
The problem is you should be using two fields. One for the year and one for
the location. They are separate pieces of data. When you combine them, you
seriously reduce your ability to find specific information. In addition,
your queries will become more complex with the two items combined.

The YearReceived field should be a Long Integer numberic field and the
RecordLocation field should be a text field.

As to your Update query question, how will you know what values to put in
what records?
I have a table that contains 80,000 records and want to add a field that I
can use to note year and location of receipt of record.

[quoted text clipped - 5 lines]

thanks in advance!


  #5  
Old July 16th, 2008, 06:09 PM posted to microsoft.public.access.queries
Klatuu
external usenet poster
 
Posts: 7,074
Default update all records in table

Describe what is in the segment code, please
--
Dave Hargis, Microsoft Access MVP


"APINDARA" wrote:

Each record has a segment code that I can see what season the name came from.

Klatuu wrote:
It is a good thing you have not gotten it done yet.
Now, you can get it done correctly.
The problem is you should be using two fields. One for the year and one for
the location. They are separate pieces of data. When you combine them, you
seriously reduce your ability to find specific information. In addition,
your queries will become more complex with the two items combined.

The YearReceived field should be a Long Integer numberic field and the
RecordLocation field should be a text field.

As to your Update query question, how will you know what values to put in
what records?
I have a table that contains 80,000 records and want to add a field that I
can use to note year and location of receipt of record.

[quoted text clipped - 5 lines]

thanks in advance!



  #6  
Old July 17th, 2008, 01:15 PM posted to microsoft.public.access.queries
APINDARA via AccessMonster.com
external usenet poster
 
Posts: 1
Default update all records in table

I like the idea of adding a column to the table. Sounds very simple!

How do I populate each record with the same value? Will it differ if I use a
numeric value or a text value?



Michel Walsh wrote:
You need a data definition language statement, or, much simpler, use the
table design and add a column to your table.

An update query can only modify values. It does not change the structure of
the table(s).

Vanderghast, Access MVP

I have a table that contains 80,000 records and want to add a field that I
can use to note year and location of receipt of record.

[quoted text clipped - 5 lines]

thanks in advance!


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

  #7  
Old July 17th, 2008, 01:55 PM posted to microsoft.public.access.queries
Michel Walsh
external usenet poster
 
Posts: 2,404
Default update all records in table



UPDATE tableName SET columnName = constant


The difference between the field being numerical, literal, or a date_time
will be about the constant itself:

3.5
"red"
and
#12-31-1999 15:35:22#


are example of the constants.



Note that since the UPDATE statement has NO where clause ALL records are so
updated. Adding a where clause will restrict the updated records to those
satisfying the criteria of the where clause.


Vanderghast, Access MVP



"APINDARA via AccessMonster.com" u44873@uwe wrote in message
news:874810474089f@uwe...
I like the idea of adding a column to the table. Sounds very simple!

How do I populate each record with the same value? Will it differ if I
use a
numeric value or a text value?



Michel Walsh wrote:
You need a data definition language statement, or, much simpler, use the
table design and add a column to your table.

An update query can only modify values. It does not change the structure
of
the table(s).

Vanderghast, Access MVP

I have a table that contains 80,000 records and want to add a field that
I
can use to note year and location of receipt of record.

[quoted text clipped - 5 lines]

thanks in advance!


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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.