I have about 40 tables worth of data that I need to turn into one large table in SQL Server. They are currently text files. I tried combining them all into an Access DB then uploading to SQL Server that way, but their datatypes, nvarchar(255)
are far too large and I need them to be smaller, but I cannot edit data types once the table is uploaded so I need to create a new table, then one by one upload the data into it. I cannot figure out the process to import data to an already made table though. Any help would be greatly appreciated.
I tried the regular way of importing but I keep getting the following error messages
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column ""Description"" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
Error 0xc020902a: Data Flow Task 1: The "output column ""Description"" (26)" failed because truncation occurred, and the truncation row disposition on "output column ""Description"" (26)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "C:\Users\vzv7kqm\Documents\Queries & Reports\UPSU Usage\UpTo1999.CSV" on data row 9104.
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - UpTo1999_CSV" (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
Why not export the data from MS Access to MS SQL Server? Nvarchar(255) just means that it is of variable length. At most, it uses 2 bytes for over head. At worst, I can store 255/2 characters. It is using UNICODE. Why not use VARCHAR(255)?
User contributions licensed under CC BY-SA 3.0