1

I'm trying to figure out how to have my SSIS package export to multiple excel files. The files will have the same fields and pulling data from the same table. However, the query statements are different. I'm trying to figure out how I would do this using a "for loop container".

The two queries are as follows:

select acct_num, item, value_year, value_status, eff_date, ref_num,ValueAmount, mileage, 
  valuation_method, note, filing_date, late_ind, billg_typ_ndx, cur_seq, supp_num, 
  exempt_type, district_code, district2, district3, form_num, cost, bill_no, 
  first_half_batch, sec_half_batch, status, dmv_type, leasing_type, bus_pct, 
  last_mod, last_user, veh_type, mileage_amt, msrp
FROM make_pp_valuation
where acct_num not in (select distinct acct_num from dbo.pp_accessory_values)
ORDER by acct_num"

select v.acct_num, v.item, v.value_year, v.value_status, v.eff_date, v.ref_num, v.ValueAmount, v.mileage, v.valuation_method, v.note, v.filing_date, v.late_ind, v.billg_typ_ndx, v.cur_seq, v.supp_num, v.exempt_type, v.district_code, v.district2, v.district3, v.form_num, v.cost, v.bill_no, v.first_half_batch, v.sec_half_batch, v.status, v.dmv_type, v.leasing_type, v.bus_pct, v.last_mod, v.last_user, v.veh_type, v.mileage_amt, v.msrp
FROM make_pp_valuation 
  v inner join pp_accessory_values a on v.acct_num = a.acct_num and v.item = a.item
ORDER by v.acct_num

1 Answer 1

1

The for-loop container is not needed here - you just need two separate exports. Add two data flow tasks to your control flow and let each one export the file you need.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.