Changing data type in a Query

  • Thread starter Thread starter JJonesJr
  • Start date Start date
J

JJonesJr

I amy trying to create an Update query to change the data type from numeric
to text.
i.e.: Field.[SUBTYPECD] is 1 and I want it to update the table with "Switch".

Thanks,
 
The data type of a table column is determined by the setting in table design
view. If you have the column defined as numeric, you cannot change it to text
in a query.
You could set some other column (defined as text) to a text value based on
the contents of a numeric column.

"i.e.: Field.[SUBTYPECD] is 1 and I want it to update the table with
"Switch"."

I don't understand what the above means, you need to be clearer.

-Dorian
 
Thanks, no wonder I could not get it to work no matter what I tried. It would
be nice it it was possible to change the data type in a query.

Thanks again.
--
Jack
CPS Energy
San Antonio, TX


mscertified said:
The data type of a table column is determined by the setting in table design
view. If you have the column defined as numeric, you cannot change it to text
in a query.
You could set some other column (defined as text) to a text value based on
the contents of a numeric column.

"i.e.: Field.[SUBTYPECD] is 1 and I want it to update the table with
"Switch"."

I don't understand what the above means, you need to be clearer.

-Dorian

JJonesJr said:
I amy trying to create an Update query to change the data type from numeric
to text.
i.e.: Field.[SUBTYPECD] is 1 and I want it to update the table with "Switch".

Thanks,
 
As you learn more about databases, you will come to realizxe that would be a
very dangerous thing to be able to do. For instance, what if you changed the
data type to text and some other user changed it back to numeric.

-Dorian.

JJonesJr said:
Thanks, no wonder I could not get it to work no matter what I tried. It would
be nice it it was possible to change the data type in a query.

Thanks again.
--
Jack
CPS Energy
San Antonio, TX


mscertified said:
The data type of a table column is determined by the setting in table design
view. If you have the column defined as numeric, you cannot change it to text
in a query.
You could set some other column (defined as text) to a text value based on
the contents of a numeric column.

"i.e.: Field.[SUBTYPECD] is 1 and I want it to update the table with
"Switch"."

I don't understand what the above means, you need to be clearer.

-Dorian

JJonesJr said:
I amy trying to create an Update query to change the data type from numeric
to text.
i.e.: Field.[SUBTYPECD] is 1 and I want it to update the table with "Switch".

Thanks,
 
Back
Top