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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 importing from multiple text files

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 columns

The format of CSV is:

t:\20010724\1234\Batch715\0001.tif,06:29:22 PM,101-05352023,,F
t:\20010724\1234\Batch715\0002.tif,06:29:23 PM,825999734312,0404,F
t:\20010724\1234\Batch715\0003.tif,06:29:25 PM,,,F
t:\20010724\1234\Batch715\0004.tif,06:29:28 PM,825999734530,0404,F
t:\20010724\1234\Batch715\0005.tif,06:29:30 PM,,,F


[BATCH]
BatchDate = 20010724
BatchNumber = Batch715
ScanStationName = 1234
ScannerNumber = 01
UniqueId = XYZ001
BatchHeaderNumber = 101-05352023
PageCount = 5
AirBillCount = 2
ScanStartTime = 06:29:20 PM
ScanStartDate = 07/24/01
ScanEndTime = 06:29:28 PM
ScanEndDate = 07/24/01
ImageDrive = t:Priority = 999
AutoRelease = No
AutoReleaseCount = 0
BatchDestination = XXXX
BatchJams_VRS = 0
BatchMultiFeeds_VRS = 0
BatchOtherErrs_VRS = 0
ReleaseDate = 07/24/01
ReleaseTime = 06:29:33 PM




thanks
-doug
   

- Advertisement -