You cannot do this in plain SQL ...
But I think, if you use, JDBC etc, you can build the query dynamically and make use of the new column datatype
HTH
Sathyaram
Quote:
Originally posted by Prabhu Gopalan
I want to CAST a varible to the datatype of a column from table.
That is,
CAST(VbleName AS tablename.columnname.datatype)
I can do CAST(VbleName AS Integer). The reasons I don't want to do like that are,
1. In future if the type of column change I have to goback and change all these codes.
2. While coding, I have full the respective table def. to findout what the respective data type is.
Do any know how to do this??
Thanks for your help.
--Prabhu.
|