For example, if your table has columns id (numeric), nm (varchar(20)), then you could use a custom query like the following to convert the id column into a varchar(10):
Code: Select all
SELECT cast(id as varchar(10)) as id, nm
FROM MyTable
Note: The exact SQL needed to perform this conversion is dependent on the database type you are reading from. In my example, I'm using nomenclature that is valid for SQL Server (i.e. Transact SQL). You may need to use different nomenclature for your database.
Steve