When I attempt to export results to Excel 2010 from a query against Teradata using ODBC connection the date columns appear blank in Excel. Any suggestions?
I unsuccessfully tried to reproduce the issue using mytest environment and Excel 2007.
What is local setting on your PC?
What is the formatof the date column?
You can see it by executing Help command
Help Column YOUR_DATE_COLUMN_NAME From YOUR_DATABASE_NAME .YOUR_TABLE_NAME;
Could you please run the following test case
- Create table
create table Test_Date
(id integer primary key not null,
– let’s insert some data
insert into Test_Date values (1, ‘2012-02-06’);
insert into Test_Date values (2, ‘2012-02-07’);
– check the data
select * from Aleksey.Test_Date;
Could you please provide a screenshot of what do you get fromthe Select statement?
Could you export it to Excel?
Now you can drop the table using
Drop Table Test_Date ;
I had the same problem when converting julian to gregorian dates in my SQL statement.
I found if Exported to CSV that the dates were included in the output, so it’s not a problem with Toad - I therefor assumed it was something to do with Excel not accepting or being able to cope with the data and data type combination being sent to it by Toad.
In the end I cheated by casting my SQLdate conversion statement into varchar and the date appeared in Excel 2010 … I have not tried to figure out what that means in terms of data types, but it worked for me.
Of course if you want to use actual dates in Excel calculations, then this won’t work for you.