Quantcast
Channel: Foro de SQL Server Data Access
Viewing all articles
Browse latest Browse all 158

SQL Data export to Excel problem with Microsoft.JET.OLEDB.4.0

$
0
0

Hello

I got a problem with datatransfer via Microsoft.JET.OLEDB.4.0.

As long as I use the following statement it's working but only 255 Characters will be transferred to Excel.

INSERT INTO OPENROWSET('Microsoft.JET.OLEDB.4.0','Excel 8.0;HDR=YES;Database=C:\xxxxxx.XLS','SELECT F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12 FROM [Tabelle1$]')SELECT TOP 65000 [Störungsnummer], CONVERT(varchar(50),[Annahmedatum],120) AS [Annahmedatum], CAST([Teilnehmernummer A] AS VARCHAR(255)) AS [Teilnehmernummer A], CAST([Annahmeperson] AS VARCHAR(255)) AS [Annahmeperson], [Annahmeplatz], CAST([Störungscode] AS VARCHAR(255)) AS [Störungscode], [Störungscode Nummer], CAST([Störungsmeldungstext] AS VARCHAR(255)) AS [Störungsmeldungstext], CAST([Wartungsvertrag] AS VARCHAR(255)) AS [Wartungsvertrag], CAST([SOSegment] AS VARCHAR(255)) AS [SOSegment], CAST([Kundensegment] AS VARCHAR(255)) AS [Kundensegment], CAST([TDV] AS VARCHAR(255)) AS [TDV] FROM [yyyyyyyyyyyy].

As soon as I try to extend the varchar over the limit of 255 the following error occurs:

String or binary data would be truncated. Export ERROR: XLS - Export in work.. (Microsoft.JET.OLEDB) The statement has been terminated.

Question: Is it possible to transfer more than 255 Characters into an Excel-Cell? If yes, whats wrong with the statement above?

Thank you very much for an early answer

regards

Chaepp


Viewing all articles
Browse latest Browse all 158

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>