Append Query - Modify Data

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I am creating an append query, where I want to pull some
data (including date field) from a table, change the dated
to a new date & then append the data back into that table.

I simplified the original append statement below but need
to know what to add to change the date prior to appending:

INSERT INTO
( [Student Number], [Name], [Date] )
SELECT ( [Student Number], [Name], [Date] )
FROM
;

Can someone tell me how to do this? Thank You.
 
How do you want to change the date? Do you want to add a week to it? Do you
want it set to today's date? Do you want to specify a new date?

The following UNTESTED SAMPLE SQL statements may give you an idea.

INSERT INTO
( [Student Number], [Name], [Date] )
SELECT [Student Number], [Name],
DateAdd("d",7,[Date]) as NewDate
FROM


Parameters [Insert New Date] as DateTime;
INSERT INTO
( [Student Number], [Name], [Date] )
SELECT [Student Number], [Name],
[Insert New Date]
FROM
 
I want to specify a new date (same date for each record in
a particular query), but each time I run this query the
date will be different. In other words, today I may run
the query & want to append the data with 12/1/03 date ...
tomorrow I might run the query & need to append the data
with 12/18/03 date. Was hoping for a popup box asking for
the date, but understand that I may need to build the
actual date into the query itself??? Thanks!

-----Original Message-----
How do you want to change the date? Do you want to add a week to it? Do you
want it set to today's date? Do you want to specify a new date?

The following UNTESTED SAMPLE SQL statements may give you an idea.

INSERT INTO
( [Student Number], [Name], [Date] )
SELECT [Student Number], [Name],
DateAdd("d",7,[Date]) as NewDate
FROM


Parameters [Insert New Date] as DateTime;
INSERT INTO
( [Student Number], [Name], [Date] )
SELECT [Student Number], [Name],
[Insert New Date]
FROM
I am creating an append query, where I want to pull some
data (including date field) from a table, change the dated
to a new date & then append the data back into that table.

I simplified the original append statement below but need
to know what to add to change the date prior to appending:

INSERT INTO
( [Student Number], [Name], [Date] )
SELECT ( [Student Number], [Name], [Date] )
FROM
;

Can someone tell me how to do this? Thank You.

.
 
Take my second example.

Parameters [Insert New Date] as DateTime;
INSERT INTO
( [Student Number], [Name], [Date] )
SELECT [Student Number], [Name],
[Insert New Date]
FROM


When you run the query, you will get a pop-up box that says
Insert New Date with a control to enter a date.

This is the simplest type of parameter query.

I want to specify a new date (same date for each record in
a particular query), but each time I run this query the
date will be different. In other words, today I may run
the query & want to append the data with 12/1/03 date ...
tomorrow I might run the query & need to append the data
with 12/18/03 date. Was hoping for a popup box asking for
the date, but understand that I may need to build the
actual date into the query itself??? Thanks!
-----Original Message-----
How do you want to change the date? Do you want to add a week to it? Do you
want it set to today's date? Do you want to specify a new date?

The following UNTESTED SAMPLE SQL statements may give you an idea.

INSERT INTO
( [Student Number], [Name], [Date] )
SELECT [Student Number], [Name],
DateAdd("d",7,[Date]) as NewDate
FROM


Parameters [Insert New Date] as DateTime;
INSERT INTO
( [Student Number], [Name], [Date] )
SELECT [Student Number], [Name],
[Insert New Date]
FROM
I am creating an append query, where I want to pull some
data (including date field) from a table, change the dated
to a new date & then append the data back into that table.

I simplified the original append statement below but need
to know what to add to change the date prior to appending:

INSERT INTO
( [Student Number], [Name], [Date] )
SELECT ( [Student Number], [Name], [Date] )
FROM
;

Can someone tell me how to do this? Thank You.

.
 
Back
Top