October 19, 2011 at 6:56 am
I am very new at SQL, but at my job I need to do some SQL. I am working on a SSIS package that combines 2 text files with data that is pipe delimited into one table. I have 1 table that has 2 pieces of information. Like...4000001|0002. I have another file that is pipe delimited that has 52 colums of information. The SQL table has 52 colums and 50 rows of info. I want to put in the two tables tables together.
400001 0002 Thomas Industries Dean Sale .....
400001 0002 Part number ....
I want to put the info 400001 0002 on each row of the table when it is imported. The number will change on each import and it is not sequential. I hope this is understandable. PLEASE HELP ASAP!!!
Clark
October 19, 2011 at 1:29 pm
I have a picture of what it is doing, but I don't have a sollution yet. If anyone would be interested in helping me figure this out I can e-mail the pic to show what I am talking about.
October 19, 2011 at 3:41 pm
October 19, 2011 at 4:57 pm
Yes, I have a sorted package running in ssis. But the problem is that the first text file has only 2 colums and 1 row. The second has many colums and many rows. I want the 2 colums in the first text file to populate as many rows as it has with the 2 colums all the same data. This will create the 1 to many later in SQL. I just need to populate the columns.
Does that make sense?
October 20, 2011 at 8:44 am
Hi
since you're only expecting one record with two fields from the first file, you can create two variables and assign those fields to the variables and then pull data from the second file and derive the two variables as additional columns and insert into the table.
hope this helps 🙂
Kabelo
October 20, 2011 at 10:58 am
I got it, I was trying to use 2 tables in the sort . One was popluated and the other was not. I did it over and everything seems to be working. THANKS
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply