Need help to resolve an issue in SSIS
Hi , Can some one suggest me how to acheive a senario using SSIS user will provide an access file with >2k records which are to be updated in another production table. I have to collect all these records as unique in another Access db and upload to production db using a tool. Problem is user will provide duplicate records to update with different columns in different rows ,ex: Row1 is to update record R1 column c1 with value "Hai" and Row100 is to update same record R1 column c12 with value "bye" . I want the data should be in one row instead of two with data R1 c1 c12 in single row . Here R1 is uniqueid. all the updates requested by user of one particular record given in different rows sholud be collected and made as one row and upload. Hope the senario is understood.... Please contact if need more clarification.Dont forget this should be done using SSIS only. Thanks in advance, Naseema.
July 11th, 2011 9:12am

Please post DDL and sample data and the expected output. Your description is not very clear. Is it in all cases C1 and c12 that is updated or ca it be also c2 or c10?
Free Windows Admin Tool Kit Click here and download it now
July 11th, 2011 9:24am

I am agree with Christa, paste sample input rows here, and let us know what you expect to be as result. and then we will help you betterhttp://www.rad.pasfu.com
July 11th, 2011 11:06am

Yes Sure Please find the sample data of Student details below In put given by user is in the given format. same Coloured rows belongs to one record . StudentID Number Name Course Year Operation 101 rx_234 UPDATE 102 X UPDATE 103 2001 UPDATE 101 Btech UPDATE 102 rx_567 UPDATE 109 Y UPDATE 101 Z UPDATE 115 MCA UPDATE 101 2009 UPDATE Output should be like this. StudentID Number Name Course Year Operation 101 rx_234 Z Btech 2009 UPDATE 102 rx_567 X UPDATE 103 2001 UPDATE 109 Y UPDATE 115 MCA UPDATE
Free Windows Admin Tool Kit Click here and download it now
July 11th, 2011 11:58am

you can use AGGREGATE transform, and use MAX for each column, also group by data stream with StudentID. http://www.rad.pasfu.com
July 11th, 2011 12:08pm

Hi Reza, Thanks for your reply , I have used MAX for each column and I have used Group by for StudentId. Now the problem is ,The query is failed due to "Invalid use of Null exception". When I ran this query in general sqlserverquery window I'm able to run. Can you plz explain why this exception came. Naseema.
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 1:15pm

problem is related to working with null values in aggregate transformation probably, could you use a derived column before aggregate transformation and check value of each column and put a default value if that was null, like this for int column: ISNULL(IntColumn) ? 0 : IntColumn then aggregate transform can work with default values, just note that use default values as minimum values which Max don't pick them.http://www.rad.pasfu.com My Submitted sessions at sqlbits.com
July 13th, 2011 1:22pm

Yes, It is related to some NUll issue. I have cleared that.Now the package is runnig successfully . Thanks alot. As I'm begginer to SSIS. Will ask some more Suggestions to look ahead of my future in SSIS... Please Suggest me REZA. Have A Nice Day....:)
Free Windows Admin Tool Kit Click here and download it now
July 15th, 2011 1:25am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics