Try to search your question here, if you can't find : Ask Any Question Now ?

Scientific notation when exporting SQL to Excel

HomeCategory: stackoverflowScientific notation when exporting SQL to Excel
willson asked 1 week ago

I have a SQL statement which is exporting data to Excel. The problem is that large numbers get converted to scientific notation when exported to Excel. To avoid that I am using char(39), i.e. single quotes around the number. In addition, also checking for null value so using ISNULL.

ISNULL(char(39) + Rtrim([NumberCol]) + char(39), '')

[NumberCol] has char datatype

So now if NumberCol is a numeric value I get ‘000123456789’ format which is what I want. But when it is Null then I get ”. I do not want to display ” in Excel rather blank. Please let me know how to do this.

1 Answers
Best Answer
Fernando answered 1 week ago
Your Answer

18 + 18 =

Popular Tags

WP Facebook Auto Publish Powered By :