ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   worksheet as SQL linked table (format problem). (https://www.excelbanter.com/excel-programming/422545-worksheet-sql-linked-table-format-problem.html)

Bob McClellan[_2_]

worksheet as SQL linked table (format problem).
 
I write to a tab on a spreadsheet as part of an automated process.
The data from the source table is INTEGER.
It winds up in the spreadsheet as TEXT.
I even try to force the data as integer.

I'm providing a brief code snippet, simply to show the
simplicity of the SQL. I am pulling my hair out because no
matter what I do, when I open the .xls, the data is there correcly, but
formatted as text.

example 27 is in as '27.
...any help would be much appreciated.
thanks in advance,
...bob

snippet:
update ExecUtilV2...ExecUtilHistoryDetailed
set D1 = convert(int,oh.d1)
, D2 = oh.d2
, D3 = oh.d3
, D4 = oh.d4
, D5 = oh.d5

FROM ExecUtilV2...ExecUtilHistoryDetailed uh
inner join EU_OnHand oh on uh.cccId = oh.cccId
where uh.id 71
and uh.id <133


All times are GMT +1. The time now is 05:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com