Solved

SSIS 2008

Posted on 2014-03-29
2
233 Views
Last Modified: 2016-02-10
Can you please answer below questions. please add your answer inline

Q1) In a Flat File there are millions of records. It consists of many
rejections data. Now if rejections are
a) from 0% to %25 of rejections, then continue process
b) from 25% to 40% of rejections, then Trigger a email
c) from 40% to 50% of rejections, then wait for user to respond
d) > 50% of rejections, then Abort the sequence

Q2) Suppose I want to execute a sql task before that i want to do some
job, how you will do?

Q3) Revenue Report has daily transactions of million and billions of
revenue records of different category as MMS Revenue, Internet Calling
Revenue etc. Want report of revenue received from 1 to 30 days. How to
do?

Q4) In one single flat file the data of customers are given in multiple
record. for e.g. first record has cust name, cust date
second record has cust address, cust phone
third record has cust email, cust status
How you will create one record destination from three records?
0
Comment
Question by:BeyondBGCM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 9

Expert Comment

by:edtechdba
ID: 39964255
This may point you in the right direction ...

Q1) I would create an Execute SQL task that directly queries the data set that is going to be returned into the flat file, and assign a value of 1, 2, 3 or 4 depending on the percentage rates. Then return the value from the SQL to a variable within the package. This way you'll have a specific indicator of which percentage range is being returned.

For example: 1 = 0 - 25%, 2 = 26 - 40%

Then use conditional logic based on the variable value (populated from the Execute SQL task) to determine which direction the process should take.

Q2) Here's an example of how to return integer values from a SQL query.

SELECT (CASE WHEN ([rejections]\[totalamount]) <= .25 THEN 1
                           WHEN ([rejections]\[totalamount]) > .25
                              AND  ([rejections]\[totalamount]) <= .40 THEN 2
                            -- and so on ..
                           END) AS rejectionrate
FROM [yourtable]
0
 
LVL 9

Accepted Solution

by:
edtechdba earned 500 total points
ID: 39964259
Q3) If you are running this within an SSIS package, I would create a data flow task, use the source task to execute a stored procedure from the database, and query the 30 day period from the stored procedure. Since I don't have any table or column information to work with, I'm unable to give you an example of how to filter out that time period.

Q4) I would take this flat file, import the data into a database table, then use a stored procedure to get all of the appropriate data columns (cust name, cust date, etc.) into the proper format.

Then use a data flow task to execute a stored procedure to return the data in the proper format and use this to populate a flat file (or whichever type of destination task you would like to use to contain this data).

I hope this helps!
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question