Query to update new fields in table

C

CS

I added two fields to a table a date field and a Day field. The table
already had approximately 40,000 records. Is there a query I can use that
will add the date and day to the already existing data. I know moving
forward I can get update with an append query.
 
P

Phil Smith

An Update query will update existing fields. Just choose the fields you
want to update, and put the data in the row marked Update to, and you
are good to go.
 
C

CS

thank you very much I will give that a try....
Phil Smith said:
An Update query will update existing fields. Just choose the fields you
want to update, and put the data in the row marked Update to, and you are
good to go.
 
J

John W. Vinson

I added two fields to a table a date field and a Day field. The table
already had approximately 40,000 records. Is there a query I can use that
will add the date and day to the already existing data. I know moving
forward I can get update with an append query.

Whoa... how are these fields related? What date do you want to put into each
record?

If [Date] is 5/4/2005 and [Day] is 4 - i.e. if it's redundantly storing the
day of the month along with the actual date - you're making a Big Mistake.
Just store the date; you can always display just the day.

If the Day field is something else, then my apologies for jumping in.


John W. Vinson [MVP]
 
C

CS

The Day field is actually the Weekday.
John W. Vinson said:
I added two fields to a table a date field and a Day field. The table
already had approximately 40,000 records. Is there a query I can use that
will add the date and day to the already existing data. I know moving
forward I can get update with an append query.

Whoa... how are these fields related? What date do you want to put into
each
record?

If [Date] is 5/4/2005 and [Day] is 4 - i.e. if it's redundantly storing
the
day of the month along with the actual date - you're making a Big Mistake.
Just store the date; you can always display just the day.

If the Day field is something else, then my apologies for jumping in.


John W. Vinson [MVP]
 
J

John W. Vinson

The Day field is actually the Weekday.

Then again ... it's redundant. You can use

Weekday([datefield])

or simply have a textbox with a format property or "w" to *display* the
weekday number based on the date.

If you have both the date and the weekday in different fields of the same
record, there's nothing to prevent entering #6/7/07# into the date field and 2
(Monday) into the weekday field. One of them is wrong; will you be able to
tell next November WHICH is wrong?

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top