Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
douglasstubbs
Starting Member
3 Posts |
Posted - 2001-07-25 : 00:36:22
|
| Hello, I have between 300 - 500 (depending on the day of week) CSV files in the same directory that I need to import into a table with the design of:ImageNbr (varchar 50), ScanTime (datetime), productNbr(varchar 12), Form(nvarchar 5), ReleaseDate (smalldatetime), ReleaseTime(char 12)I only need to import the lines that start with "t:" and strip the date and time from the last 2 lines and put it into the respective columnsThe format of CSV is:t:\20010724\1234\Batch715\0001.tif,06:29:22 PM,101-05352023,,Ft:\20010724\1234\Batch715\0002.tif,06:29:23 PM,825999734312,0404,Ft:\20010724\1234\Batch715\0003.tif,06:29:25 PM,,,Ft:\20010724\1234\Batch715\0004.tif,06:29:28 PM,825999734530,0404,Ft:\20010724\1234\Batch715\0005.tif,06:29:30 PM,,,F[BATCH]BatchDate = 20010724BatchNumber = Batch715ScanStationName = 1234ScannerNumber = 01UniqueId = XYZ001BatchHeaderNumber = 101-05352023PageCount = 5AirBillCount = 2ScanStartTime = 06:29:20 PMScanStartDate = 07/24/01ScanEndTime = 06:29:28 PMScanEndDate = 07/24/01ImageDrive = t:Priority = 999AutoRelease = NoAutoReleaseCount = 0BatchDestination = XXXXBatchJams_VRS = 0BatchMultiFeeds_VRS = 0BatchOtherErrs_VRS = 0ReleaseDate = 07/24/01 ReleaseTime = 06:29:33 PMthanks-doug |
|
|
|
|
|
|
|