Excel Report using Data Connection issue with MS SQL Timestamp

Posted on 2012-09-12
Medium Priority
Last Modified: 2012-09-25

I have a Excel 2007 report using Data Connections to MS SQL views. The report came out perfect except for 2 [TIMESTAMP] fields are just not appearing in the report.

I tried for other SQL tables and the same thing happened. How can I get the Excel to show these columns?

Below pic shows I can see the 2 columns in MS SQL.
View can be seen in MS SQL select statement
Question by:NicksonKoh
LVL 16

Accepted Solution

DcpKing earned 2000 total points
ID: 38393554
try this code instead:

select top 100 No,
cast(Time_Stamp_Src as bigint) as 'Time_Stamp_Src',
cast(Time_Stamp_Tgt as bigint) as 'Time_Stamp_Tgt',
from mutu.spm.v_erp_prod_item_c

Open in new window

you'll just get numbers, because that's what they are - sequential numbers.  Conversion to nchars or nvarchars is forbidden, which is what's happening as the system sends them to Excel.


LVL 17

Author Closing Comment

ID: 38435124
Thx. I adopted your idea!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question