Update Field with another Field, same table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How come when I try to update a field with another field from the same table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
Yes it is possible and what you posted should work. Although I really don't
like your field name being only numbers.

What error are you getting?

Your posted code does have a space between Master. and [CY]. If that is not
a typo, then I suspect that could be the problem.
 
I don't get an error, instead I get the field [05] and a blank column of
nothing? I feel like I'm in Excel, making a circular reference!

John Spencer said:
Yes it is possible and what you posted should work. Although I really don't
like your field name being only numbers.

What error are you getting?

Your posted code does have a space between Master. and [CY]. If that is not
a typo, then I suspect that could be the problem.

Kou Vang said:
How come when I try to update a field with another field from the same
table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

KARL DEWEY said:
What kind of error message do you get? Are both fields the same datatype?

Kou Vang said:
How come when I try to update a field with another field from the same table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
Post your query SQL statement.

Kou Vang said:
When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

KARL DEWEY said:
What kind of error message do you get? Are both fields the same datatype?

Kou Vang said:
How come when I try to update a field with another field from the same table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
Select Query: Run from the menu bar. or Click the Red Exclamation mark.

If You are switching views to the datasheet view from the SQL view or the
grid view, Access only displays what will be updated if you execute the
query.
Kou Vang said:
When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

KARL DEWEY said:
What kind of error message do you get? Are both fields the same
datatype?

Kou Vang said:
How come when I try to update a field with another field from the same
table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
It's at the bottom. But here it is again.

UPDATE Master SET Master.[05] = Master.[CY];

KARL DEWEY said:
Post your query SQL statement.

Kou Vang said:
When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

KARL DEWEY said:
What kind of error message do you get? Are both fields the same datatype?

:

How come when I try to update a field with another field from the same table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
That makes sense John. So you don't actually see what will be updated, until
after you run the query itself? I'm an idiot. I should have known that.
Thanks for the revelation. Thanks to Karl to for trying to inform me of that.

John Spencer said:
Select Query: Run from the menu bar. or Click the Red Exclamation mark.

If You are switching views to the datasheet view from the SQL view or the
grid view, Access only displays what will be updated if you execute the
query.
Kou Vang said:
When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

KARL DEWEY said:
What kind of error message do you get? Are both fields the same
datatype?

:

How come when I try to update a field with another field from the same
table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
Sorry, that is not what I am looking for. Open your query in design view,
click on menu VIEW - SQL View. Highlight, copy, and paste in a post.

Kou Vang said:
It's at the bottom. But here it is again.

UPDATE Master SET Master.[05] = Master.[CY];

KARL DEWEY said:
Post your query SQL statement.

Kou Vang said:
When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

:

What kind of error message do you get? Are both fields the same datatype?

:

How come when I try to update a field with another field from the same table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
Karl,
I ran the update query that was in the SQL view. It updated the field
[05]. But when I went to delete the contents of [CY] from the table, the
values in [05] also was deleted. Is this because [05]=[CY]? Once I update
[05] with [CY], how do delete the contents of [CY], without losing the
contents of [05]?


KARL DEWEY said:
Sorry, that is not what I am looking for. Open your query in design view,
click on menu VIEW - SQL View. Highlight, copy, and paste in a post.

Kou Vang said:
It's at the bottom. But here it is again.

UPDATE Master SET Master.[05] = Master.[CY];

KARL DEWEY said:
Post your query SQL statement.

:

When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

:

What kind of error message do you get? Are both fields the same datatype?

:

How come when I try to update a field with another field from the same table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
See my last post.

Kou Vang said:
Karl,
I ran the update query that was in the SQL view. It updated the field
[05]. But when I went to delete the contents of [CY] from the table, the
values in [05] also was deleted. Is this because [05]=[CY]? Once I update
[05] with [CY], how do delete the contents of [CY], without losing the
contents of [05]?


KARL DEWEY said:
Sorry, that is not what I am looking for. Open your query in design view,
click on menu VIEW - SQL View. Highlight, copy, and paste in a post.

Kou Vang said:
It's at the bottom. But here it is again.

UPDATE Master SET Master.[05] = Master.[CY];

:

Post your query SQL statement.

:

When I run the SQL I just simply get the field back but it's the same,
completely blank? Both fields are the same.

:

What kind of error message do you get? Are both fields the same datatype?

:

How come when I try to update a field with another field from the same table,
it doesn't work? Exp:

SQL:

UPDATE Master SET Master.[05] = Master. [CY];

Is this not possible?
 
Back
Top