Hello,I have an issue trying to import oil and gas data from a magnetic tape into SQL Server. At this point all I want to do is import into a staging table and then I will absorb the information accordingly. The whole reason for this is that just importing the data (at least for me) has become impossible. I have tried everything from OPENROWSET, BULK INSERT, and the SQL Server import wizard to just get the data into the staging table but I'm discovering it might not be possible. The data was converted into a ASCII text file and so I have been using the usual Flat File Source in the SQL Server Import Wizard. There are no headers in the file. The Column delimiter is {CR}{LF} and the Row delimiter is {CR}{LF}01. Yes, it is {CR}{LF}01 (a zero and a one - number). Now because this delimiter is not shown in the typical drop down I have tried to find a number of workarounds. I have tried everything in the import wizard under row delimiter, {CR}{LF}01, {CR}{LF}{01}, {CR}{LF}<01>, {CRLF01}, etc. Nothing works. So, I tried OPENROWSET and BULKINSERT, but each failed because of errors related to truncation and random errors. Interestingly, the closest I have gotten to a solution is with the import wizard, however because I cannot delimit by a row (because it does not fall in the drop down - {CR}{LF}01 cannot be recognized or any combination herein) I have put everything into a row with one column. This would work except SQL Server ORDERS THE DATA!!! So I can no longer tell which data is for which well! I have tried to find ways to turn this functionality off, but with no luck. So, all in all, I can't delimit by unique identifier nor can I turn off the sort function inherent to the import wizard. At this point I think it is impossible to even import a text file with unique delimiters into SQL Server which is a shame because the text file is more than 10 GBs in size so any ordinary program cannot handle it.However, I am pinning my hope on someone knowing a way to designate a row delimiter that deviates from the list in the SQL Server Import Wizard (right click on database, select tasks, import data, etc.). If there is a better way, I am more than happy to invesitgate.Any help would be much appreciated.Kevin
↧