![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We're going to get back a file with row-types stored in the first 3 characters of each row. That will determine the data layout for each row. The rows vary in length. Will the "Read File" transform allow me to import the data row by row into SQL so I can then work on the various sets of data or is there a better way to handle this? Tried looking at the examples of "Read File" on the web and in BOL, but wasn't sure exactly how to use for my purposes or if this would do what I need it to do. Any ideas on how to handle data sets like this? I know that it must be possible short of moving up to Yukon (tempting though that may be). Thanks in advance. -Pete Schott |
#3
| |||
| |||
|
|
The ReadFile transformation will read a file into SQL Server Read File Transformation (http://www.sqldts.com/default.aspx?304) Rows varying in length is in itself no big deal. Can you show a part of the file and maybe show the destination? -- |
#4
| |||
| |||
|
|
Well, ideally I'd love a way to read in the 000............................................. rows and use the appropriate fixed-length values for those at the same time as reading the 001............................................. rows and using the appropriate fixed-length values for those. Seems that the Bulk Insert task actually reads each line of the file into its own row. That could work for me. It's not ideal as I then have to break down the rows in the table using a bunch of SUBSTRING commands, but it could work. Is there a way in DTS to read each row and break it up based on some portion of that row? (If not in 2000, is it possible in Yukon?) Thanks. -Pete "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote: The ReadFile transformation will read a file into SQL Server Read File Transformation (http://www.sqldts.com/default.aspx?304) Rows varying in length is in itself no big deal. Can you show a part of the file and maybe show the destination? -- |
#5
| |||
| |||
|
|
BULK INSERT will split on delimiters as well. You want to treat the whole row as a single row. Yukon will have a much better GUI for you yes (If I understand what you are trying to do) -- |
#6
| |||
| |||
|
|
Guess it's time to head over to the Yukon forums as well. Didn't see that Bulk Insert would split on delimiters. I'll take a look at that. Is that the command or the DTS operation? Basic format: 000......................................... 001........................ 001........................ 000......................................... 001........................ 000......................................... 001........................ 001........................ 001........................ So on and so on. Each type of row has the same length and fixed-length field definitions. If I could get that on the fly it would be great. Directly into my tables. Thanks. -Pete "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote: BULK INSERT will split on delimiters as well. You want to treat the whole row as a single row. Yukon will have a much better GUI for you yes (If I understand what you are trying to do) -- |
#7
| |||
| |||
|
|
DTS BI and TSQL BI are the same just a pretty wrapper is provided in DTS OK So from what you have here it looks as though you have different table rows in each file. The table is defined by the first string (000,001) If the meta data is the same then when you look in Yukon you are looking for the conditional split transform. -- |
![]() |
| Thread Tools | |
| Display Modes | |
| |