ODBC 32-bit databases and Eviews 12

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

EViews Steve
EViews Developer
Posts: 788
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: ODBC 32-bit databases and Eviews 12

Postby EViews Steve » Mon Mar 01, 2021 5:21 pm

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 4675 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

centroid
Posts: 20
Joined: Fri Feb 05, 2021 4:46 am

Re: ODBC 32-bit databases and Eviews 12

Postby centroid » Mon Mar 01, 2021 6:29 pm

Thanks, that worked.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 13 guests