October 14, 2009 at 3:42 pm
Hello all,
i want to load data in one sql server table.
i have 56 different text files for different states and these text files have data inside them and i need to load these data in only one sql table.
I can create an ssis package but then i have to create 56 different text file connections and union all and then insert to ole db destination which is very long.
is there any shortcut u know abt how to perform this thing? like for each loop or bcp task? i dont know how to use these tasks so plz give me some more hint abt how to use.
Thanks
October 14, 2009 at 4:12 pm
Do all of the files have the same format? If so, you'll only need one file connection. You can use a For Each loop container to loop through a directory of files and import each file one-at-a-time.
October 15, 2009 at 11:53 am
thanksa lot. I got that but one lil confusion. for one of my column values in text files are 00 but after running packkage i can see values as 0 (datatype-int in table) where should i change my datatype and wht so that i can see 00 type of result
Thanks
October 15, 2009 at 12:12 pm
For that value to be stored in the database as '00', it will need to be a char/varchar data type. I would question changing it through depending on what that data represents. If it truely represents an integer value, leave it as integer. If it is a 2 digit code of some sort, change it. Keep in mind that there is a difference in storaging the data and displaying the data. Store the data in the appropriate data type that correctly represents the data. Use logic in your stored procedures and views to display, or retrieve, the data in the format of your choice.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply