SSIS Row Count with Condition
Todd, I placed as an example which similar to my execution,I have another 54 columns and I tried with Aggregate component it creates the single counts for each rows.even though after the count I have to create another 54 columns (Derived Columns) But Aggregate component is not work here. Do you know how for each loop work with table each rows? and update each rows on product_id.? I am new so please explain in detail. Thanks..
October 5th, 2012 10:30am

Thanks Praveen but I put one example here. I have more product id,It depends on the client's file so there is no specific product id. As per your help I can't take three variables. Please suggest more ways...Thanks...
Free Windows Admin Tool Kit Click here and download it now
October 5th, 2012 10:35am

So using an aggregate function gives you this sort of output: Insert the result into a temporay staging table and then update Product_category table using a single update statement in an Execute SQL Task; why do you want to update it row by row?http://btsbee.wordpress.com/
October 5th, 2012 11:33am

Hi, I have Product table have Productid and Product_No as Primary key. Now when I process the rows and filter it in Black,Blue,Red,white color category. I know How to filter it but the problem is I have to update the row counts in another table Product_Category(Product_Id as PK). but I have update according to Product_DI. Explanation:-Filtering Product table with Black color Product table Product_ID | Product_No | Price | Color 1 | 1 | 2.50 | Black 1 | 2 | 0.96 | Black 1 | 3 | 0.96 | Black 1 | 4 | 0.96 | Black 2 | 1 | 0.96 | Black 2 | 2 | 0.96 | Black 3 | 1 | 0.96 | Black SO I have to update the Product_Category Product_ID | Color_CNT 1 | 4 2 | 2 3 | 1 Please share your knowledge. Appreciate your help. Thank You, 343
Free Windows Admin Tool Kit Click here and download it now
October 6th, 2012 4:02am

Use a SQL query Select Product_ID, Count(Product_ID) From Product Group By Product_ID http://btsbee.wordpress.com/
October 6th, 2012 4:16am

I have to perform if from ssis with row count.
Free Windows Admin Tool Kit Click here and download it now
October 6th, 2012 4:56am

Use an Aggregate component. Group By the Product_ID column. Talk to me now on
October 6th, 2012 2:38pm

You cannot do this using row count. Use Execute SQL Task and write sql , update t set Color_CNT=s.cnt from table_update t inner join (select product_id,count(1) as cnt from table group by product_id ) as s on t.product_id=s.product_id Regards, YB
Free Windows Admin Tool Kit Click here and download it now
October 6th, 2012 3:56pm

Yeah use the aggregate function. Check this on how.http://btsbee.wordpress.com/
October 6th, 2012 6:18pm

Hi There, After connecting to Souce, Use a "Conditional Split" transformation. Write the conditions on the Product_ID. Create three variables of integer type and use the RowCount transformation to count the no of records. By this you can count no of records for each and every Product_ID. Thanks, Praveen.
Free Windows Admin Tool Kit Click here and download it now
October 6th, 2012 8:20pm

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

Other recent topics Other recent topics