Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6892421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:32:00+00:00 2026-05-27T06:32:00+00:00

Let me preface this with saying I am still a newbie when it comes

  • 0

Let me preface this with saying I am still a newbie when it comes to SSIS. I am trying to replace a current MS Access process that has 13 queries that get created in excel and emailed to a list of users.

My SSIS package needs to get the report name, email dist list, report data, create a csv file and then send an email for each one.

I have created the following in SQL Server:

  1. a table with the reports – each has a ReportId
  2. a table with the users email addresses
  3. a join table that links the user to each report
  4. Created a stored proc when I pass in the ReportId and it returns the Email Dist List as well as some report details for use when I send my emails
  5. Created a stored proc that I pass the ReportId to. In return I will get any of the values for that report. Each report has a different query that returns different columns of data.

I have also attempted to create an SSIS package that does the following:

  1. using an Execute SQL Task get the list of Active Report Ids
  2. a Foreach Container Loop set to ADO Enumerator to loop through each report Id
  3. an Execute SQL Task that will return my report details and email dist list for each report id.

Then I tried placing a Data Flow Task inside of my loop and to run my stored proc to return the report data for each report id but I am getting an error message:

Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. 
Error code: 0x80040E55. An OLE DB record is available.  
Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E55  Description: "Column does not exist.". 

I am guessing this error is because my columns are not the same on each report. If that is the case, then do you have any suggestions about how to proceed?

What steps should I use in my SSIS package to go through each report? Do I need to create a separate SSIS package to run each report?

If I can run this in one package, do I need to create a flat file connection manager for each one of my csv reports that I generate?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:32:01+00:00Added an answer on May 27, 2026 at 6:32 am

    I think your approach is sound, you just need to do something different on step 3. I think sp_send_dbmail might be an option (call it via Execute SQL Task).

    You can assign your #6 query to the @query parameter (@query = “EXECUTE dbo.MakeReport @reportid=10′) and @attach_query_result_as_file=1 and, assuming you’ve turned on database mail, it will send an email to the recipients with the results of your query as a CSV.

    Use expressions to set the to, cc, and bcc based on the results of your first query and voila, spam-o-matic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me preface this by saying that I'm well aware that running user supplied
So let me preface this by saying that I'm not an SQL wizard by
First, let me preface this by saying that I'm brand-new to Ember.js and relatively
Let me preface by saying that I saw this other question on the subject
Let me preface this by saying that my code seems to work for all
Let me preface this by saying that I'm pretty new to Java. I have
Let me preface this by saying that I know the ContactCenter sample is just
Let me preface this with saying that I am new to Ruby. I was
First let me preface this question by saying that I'm fairly new to Javascript.
Let me preface this by saying that perhaps there's a better way to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.