Page 2 of 2

Re: ODBC 32-bit databases and Eviews 12

Posted: Mon Mar 01, 2021 5:21 pm
by EViews Steve
To read in a numeric column as a string, you need to convert the column data type in a custom query.
select_table.png
select_table.png (7.43 KiB) Viewed 6200 times
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

Re: ODBC 32-bit databases and Eviews 12

Posted: Mon Mar 01, 2021 6:29 pm
by centroid
Thanks, that worked.