How can I Import SAP txt file into SQL Server Express 2017?

213 Views Asked by At

For now the closest thing to an ETL process I can get is using the Import Wizard to upload data from a periodic SAP job. The problem is that our SAP implementation outputs a txt file that is failing to import. Please see below a sample of the txt files I am attempting to import.

Sample file

27.07.2018                                                                              Dynamic List Display                                                                                      1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|  Material |Plnt|SLoc|Batch     |Created   |Created by|Last Chg  |Changed by|Year|Pe|PIB|Unrestricted|Stock in tfr|In Qual. Insp.|Restricted|Blocked|Returns|GrV     |Stock Category|Reserved qty|
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|  00R000002|US03|Z101|0021662831|19.12.2017|RFCDWP    |27.07.2018|PFPREMOTE1|2018| 7|   |    920,000 |      0,000 |        0,000 |    0,000 | 0,000 | 0,000 |1800  57|TWA999999     |      0,000 |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1

There are 1 best solutions below

0
On

The import wizard was creating a "Column0" and although I was ignoring it, when selecting a data source the DataType had to be changed to "text stream" (string(x) might have also worked but I am ignoring the column later on anyways so I didn't care to find out)