Moving from one field to another

C

Che

I want to copy the contents of a field in one table to another field in
another table using an update query. What is the expression I write for that
field?
 
R

Rick B

You build an update query, but why would you do this? Normally you would
not store the same data in two tables. It is redundant. If the item
changes how will you remember to update both tables?

In a relational database, you only need to store data in one place. You can
then create relationships to link more than one table so the data can be
seen in one place (form/query/report).

Post back with some specifics if you need a more detailed answer.
 
C

Che

This information comes from another database. The update query is used to
match up members in one database to members in another database. We simply
wanted to updated their member ids from one record to another.
 
R

Rick B

Cool. You could link the table to your database or import the data, then
build an UPDATE query. You will have to have a related field between the
two tables. Just update the field in your table with the value from the
field in the other table.
 
C

Che

Yes. I've done that, but what is the expression I write for that, I tried to
simply us the field name (i.e. [fieldname]) and it didn't work, I tried an
"iif" expression, nothing. I think I'm just using the wrong expression type.
 
R

Rick B

Post your sql here so we can see the query.

--
Rick B



Che said:
Yes. I've done that, but what is the expression I write for that, I tried
to
simply us the field name (i.e. [fieldname]) and it didn't work, I tried an
"iif" expression, nothing. I think I'm just using the wrong expression
type.

Rick B said:
Cool. You could link the table to your database or import the data, then
build an UPDATE query. You will have to have a related field between the
two tables. Just update the field in your table with the value from the
field in the other table.
 
C

Che

first one I used was:

Update to: [CnBio_ID] and it yield 0 results

the second one I used was:
IIf([REID]=Null,"[CnBio_ID]")

The REID is the field I want to update.

Rick B said:
Post your sql here so we can see the query.

--
Rick B



Che said:
Yes. I've done that, but what is the expression I write for that, I tried
to
simply us the field name (i.e. [fieldname]) and it didn't work, I tried an
"iif" expression, nothing. I think I'm just using the wrong expression
type.

Rick B said:
Cool. You could link the table to your database or import the data, then
build an UPDATE query. You will have to have a related field between the
two tables. Just update the field in your table with the value from the
field in the other table.

--
Rick B



This information comes from another database. The update query is used
to
match up members in one database to members in another database. We
simply
wanted to updated their member ids from one record to another.

:

You build an update query, but why would you do this? Normally you
would
not store the same data in two tables. It is redundant. If the item
changes how will you remember to update both tables?

In a relational database, you only need to store data in one place.
You
can
then create relationships to link more than one table so the data can
be
seen in one place (form/query/report).

Post back with some specifics if you need a more detailed answer.

--
Rick B



I want to copy the contents of a field in one table to another field
in
another table using an update query. What is the expression I write
for
that
field?
 
R

Rick B

No, post the entire query sql. It should look something like...


UPDATE employees, Incidents SET employees.FirstName =
[Incidents].[Firstname];


This updates the "FirstName field in the employees table with the
"Firstname" field from the Indidents table.


--
Rick B



Che said:
first one I used was:

Update to: [CnBio_ID] and it yield 0 results

the second one I used was:
IIf([REID]=Null,"[CnBio_ID]")

The REID is the field I want to update.

Rick B said:
Post your sql here so we can see the query.

--
Rick B



Che said:
Yes. I've done that, but what is the expression I write for that, I
tried
to
simply us the field name (i.e. [fieldname]) and it didn't work, I tried
an
"iif" expression, nothing. I think I'm just using the wrong expression
type.

:

Cool. You could link the table to your database or import the data,
then
build an UPDATE query. You will have to have a related field between
the
two tables. Just update the field in your table with the value from
the
field in the other table.

--
Rick B



This information comes from another database. The update query is
used
to
match up members in one database to members in another database. We
simply
wanted to updated their member ids from one record to another.

:

You build an update query, but why would you do this? Normally you
would
not store the same data in two tables. It is redundant. If the
item
changes how will you remember to update both tables?

In a relational database, you only need to store data in one place.
You
can
then create relationships to link more than one table so the data
can
be
seen in one place (form/query/report).

Post back with some specifics if you need a more detailed answer.

--
Rick B



I want to copy the contents of a field in one table to another
field
in
another table using an update query. What is the expression I
write
for
that
field?
 
C

Che

I'm really new to the SQL speak, so things will go over my head. I'm updating
constituent IDs only. So, am I replacing the terms like Firstname with the
fields I'm updating and incidents is the name of the table?


Rick B said:
No, post the entire query sql. It should look something like...


UPDATE employees, Incidents SET employees.FirstName =
[Incidents].[Firstname];


This updates the "FirstName field in the employees table with the
"Firstname" field from the Indidents table.


--
Rick B



Che said:
first one I used was:

Update to: [CnBio_ID] and it yield 0 results

the second one I used was:
IIf([REID]=Null,"[CnBio_ID]")

The REID is the field I want to update.

Rick B said:
Post your sql here so we can see the query.

--
Rick B



Yes. I've done that, but what is the expression I write for that, I
tried
to
simply us the field name (i.e. [fieldname]) and it didn't work, I tried
an
"iif" expression, nothing. I think I'm just using the wrong expression
type.

:

Cool. You could link the table to your database or import the data,
then
build an UPDATE query. You will have to have a related field between
the
two tables. Just update the field in your table with the value from
the
field in the other table.

--
Rick B



This information comes from another database. The update query is
used
to
match up members in one database to members in another database. We
simply
wanted to updated their member ids from one record to another.

:

You build an update query, but why would you do this? Normally you
would
not store the same data in two tables. It is redundant. If the
item
changes how will you remember to update both tables?

In a relational database, you only need to store data in one place.
You
can
then create relationships to link more than one table so the data
can
be
seen in one place (form/query/report).

Post back with some specifics if you need a more detailed answer.

--
Rick B



I want to copy the contents of a field in one table to another
field
in
another table using an update query. What is the expression I
write
for
that
field?
 
R

Rick B

Open your query in design view. Then click the View menu, then "SQL View".
Copy the text displayed and paste it here.

--
Rick B



Che said:
I'm really new to the SQL speak, so things will go over my head. I'm
updating
constituent IDs only. So, am I replacing the terms like Firstname with the
fields I'm updating and incidents is the name of the table?


Rick B said:
No, post the entire query sql. It should look something like...


UPDATE employees, Incidents SET employees.FirstName =
[Incidents].[Firstname];


This updates the "FirstName field in the employees table with the
"Firstname" field from the Indidents table.


--
Rick B



Che said:
first one I used was:

Update to: [CnBio_ID] and it yield 0 results

the second one I used was:
IIf([REID]=Null,"[CnBio_ID]")

The REID is the field I want to update.

:

Post your sql here so we can see the query.

--
Rick B



Yes. I've done that, but what is the expression I write for that, I
tried
to
simply us the field name (i.e. [fieldname]) and it didn't work, I
tried
an
"iif" expression, nothing. I think I'm just using the wrong
expression
type.

:

Cool. You could link the table to your database or import the
data,
then
build an UPDATE query. You will have to have a related field
between
the
two tables. Just update the field in your table with the value
from
the
field in the other table.

--
Rick B



This information comes from another database. The update query is
used
to
match up members in one database to members in another database.
We
simply
wanted to updated their member ids from one record to another.

:

You build an update query, but why would you do this? Normally
you
would
not store the same data in two tables. It is redundant. If the
item
changes how will you remember to update both tables?

In a relational database, you only need to store data in one
place.
You
can
then create relationships to link more than one table so the
data
can
be
seen in one place (form/query/report).

Post back with some specifics if you need a more detailed
answer.

--
Rick B



I want to copy the contents of a field in one table to another
field
in
another table using an update query. What is the expression I
write
for
that
field?
 
C

Che

Let's see.... Here's what I entered

Field: REID (what I want to update)
Table: Reconstruction (table I want to update)
Update to: [RE Database].[CnBio_ID] (where it generates the info from)

And it worked... Thank you, Rick!
Rick B said:
No, post the entire query sql. It should look something like...


UPDATE employees, Incidents SET employees.FirstName =
[Incidents].[Firstname];


This updates the "FirstName field in the employees table with the
"Firstname" field from the Indidents table.


--
Rick B



Che said:
first one I used was:

Update to: [CnBio_ID] and it yield 0 results

the second one I used was:
IIf([REID]=Null,"[CnBio_ID]")

The REID is the field I want to update.

Rick B said:
Post your sql here so we can see the query.

--
Rick B



Yes. I've done that, but what is the expression I write for that, I
tried
to
simply us the field name (i.e. [fieldname]) and it didn't work, I tried
an
"iif" expression, nothing. I think I'm just using the wrong expression
type.

:

Cool. You could link the table to your database or import the data,
then
build an UPDATE query. You will have to have a related field between
the
two tables. Just update the field in your table with the value from
the
field in the other table.

--
Rick B



This information comes from another database. The update query is
used
to
match up members in one database to members in another database. We
simply
wanted to updated their member ids from one record to another.

:

You build an update query, but why would you do this? Normally you
would
not store the same data in two tables. It is redundant. If the
item
changes how will you remember to update both tables?

In a relational database, you only need to store data in one place.
You
can
then create relationships to link more than one table so the data
can
be
seen in one place (form/query/report).

Post back with some specifics if you need a more detailed answer.

--
Rick B



I want to copy the contents of a field in one table to another
field
in
another table using an update query. What is the expression I
write
for
that
field?
 
Top