Update Query

  • Thread starter Thread starter DEI
  • Start date Start date
D

DEI

I am converting data in imported tables. I am wondering
whether there is an easy way to create (1) update query
and run it for multiple tables, rather than re-create the
query for each table. Is there a way to do this with
parameter values?

Also, I am replacing the "text" name of each month to the
first of each month, in "date/time" format, ex: "JANUARY"
= 1/1/03. Is there any easier way to fo this other than
writing a long IIF statement and then converting the data
type from text to date/time in the table's design view
after the fact?

Thanks in advance
 
I am converting data in imported tables. I am wondering
whether there is an easy way to create (1) update query
and run it for multiple tables, rather than re-create the
query for each table. Is there a way to do this with
parameter values?

No. You'ld need to write VBA code to generate the SQL.
Also, I am replacing the "text" name of each month to the
first of each month, in "date/time" format, ex: "JANUARY"
= 1/1/03. Is there any easier way to fo this other than
writing a long IIF statement and then converting the data
type from text to date/time in the table's design view
after the fact?

Could you consider, instead of importing multiple files each to its
own table, creating a single large table with the appropriate field
types? If you did so you'ld not only avoid the update query issue, but
be able to append an expression such as

AddDate: CDate("1-" & [textmonth] & "-2003")

to convert the text date to a Date/Time before it's loaded to the
table.
 
Back
Top