What?
A quick article on an alternative to multiple lookups in SSIS. For any SSIS developer trying to create packages that need to decode a number of values into their full name/description (eg. "M" to "Male", "Prof" to "Professor").

Why?
Our extract phase in the SSIS package takes data from a source database and puts it in staging in the exact form it came through. Our transform package will convert the data and output it to the target system. For our package to decode what "M" means, it needs to look this up in a table on the original server. We had around 12 lookups to do, so you could do this:
But we didn't want to do this.

How?

Applies To:
  • MS SQL Server 2008 R2
  • MS Windows 7 Enterprise (Client)
  • MS Excel 2010

What?
A really quick note on how to insert a carriage return or new line into the column name/alias (the header). It might seem trivial but these little aesthetic changes done at the database level can save some time.

Why?
I have an Excel report which dynamically gets its content from a data source located on a database on the other side of the world. I want the header in the column "Academic Week" to break across two lines so that the column doesn't expand to the width of "Academic Week" and instead expands to the width of the word "Academic".

What I have:
copyraw
Academic Week    Monday      Tuesday     Wednesday   Thursday    Friday
---------------- ----------- ----------- ----------- ----------- -----------
1                14-Jul-2014 15-Jul-2014 16-Jul-2014 17-Jul-2014 18-Jul-2014
2                21-Jul-2014 22-Jul-2014 23-Jul-2014 24-Jul-2014 25-Jul-2014
...
  1.  Academic Week    Monday      Tuesday     Wednesday   Thursday    Friday 
  2.  ---------------- ----------- ----------- ----------- ----------- ----------- 
  3.  1                14-Jul-2014 15-Jul-2014 16-Jul-2014 17-Jul-2014 18-Jul-2014 
  4.  2                21-Jul-2014 22-Jul-2014 23-Jul-2014 24-Jul-2014 25-Jul-2014 
  5.  ... 
What I want:
copyraw
Academic 
Week      Monday      Tuesday     Wednesday   Thursday    Friday
--------- ----------- ----------- ----------- ----------- -----------
1         14-Jul-2014 15-Jul-2014 16-Jul-2014 17-Jul-2014 18-Jul-2014
2         21-Jul-2014 22-Jul-2014 23-Jul-2014 24-Jul-2014 25-Jul-2014
...
  1.  Academic 
  2.  Week      Monday      Tuesday     Wednesday   Thursday    Friday 
  3.  --------- ----------- ----------- ----------- ----------- ----------- 
  4.  1         14-Jul-2014 15-Jul-2014 16-Jul-2014 17-Jul-2014 18-Jul-2014 
  5.  2         21-Jul-2014 22-Jul-2014 23-Jul-2014 24-Jul-2014 25-Jul-2014 
  6.  ... 


How?
To do this in a select query resultset, you insert the special character references "CHAR(10)" [line feed] and "CHAR(13)" [carriage return] but to do this in the name of the column heading, the answer is a much simpler one,
Category: SQL Server :: Article: 568

What?
This is an article to demonstrate a quick step-by-step on having an SSIS package loop through a directory/folder of files in order to populate a database table. We could add each file as a separate connection manager but this is inefficient and not versatile enough to accommodate files that get added later.

Why?
I am creating an extract SSIS package intended to take a text file as its source and to populate a database table with this data. Note that this only works if all the text files to be used as source data have the same number of columns and where the column widths match.

How?
I've adapted my real working product with an example. As my work was for a Personnel/HR project, and data confidentiality is somewhat important, some of the images will be censored or data changed in the example below.

What?
I started getting this error:
copyraw
The task with the name "Data Flow Task" and the creation name "DTS.Pipeline.2" is not registered for use on this computer
  1.  The task with the name "Data Flow Task" and the creation name "DTS.Pipeline.2" is not registered for use on this computer 


Why?
We use a combination of MS Visual Studio 2008, 2010 and 2012. VS2008 for our old SSIS packages and VS2010 for database solutions running against SQL Server 2008 R2. We can use VS2012 for both but this requires upgrading all the packages and then making them suitable for our new SQL Server 2012 instances.

How?
This applies to a workstation (hopefully you're not doing development directly on the server). I re-installed sql server setup, re-ran the repair to no avail. A clue came from the MS site for an older version of the pipeline in that you access the SQL Server Configuration Manager. This may not be the fix for you but it was for me:
  1. Open Start > All Programs > SQL Server 2012 (or your latest)
  2. Expand "Configuration Tools" and open "Sql Server Configuration Mnaager".
  3. Right-click on "SQL Server Integration Services 10.0" and select "STOP".
  4. Right-click on "SQL Server (SQLEXPRESS)" and select "STOP".


Category: SQL Server Integration Services :: Article: 566

Applies to:
  • Microsoft SQL Server Reporting Services 2012
  • Microsoft Visual Studio 2012 Premium
  • Microsoft Windows 7 Enterprise

What?
So I have a column in an SSRS report which displays a date. Being rather pernickety, I would like a question mark to display if there is no date to populate the field.

Why?
At the moment, the expression in there is something like this:
copyraw
=Format(Fields!MyCompletionTime.Value, "dd/MM/yyyy HH:mm:ss")
-- yields 11/02/2014 11:21:32
  1.  =Format(Fields!MyCompletionTime.Value, "dd/MM/yyyy HH:mm:ss") 
  2.  -- yields 11/02/2014 11:21:32 
Sounds good, where's the problem?

Category: SQL Server Reporting Services :: Article: 562

What?
This article describes a solution our reporting server administrators found to cut the loading time of the first report of the day.

Why?
Take any SSRS report, if one of us was the first to run it on that day, it would take an additional 60 seconds to get with it and display the report. Any subsequent running of the report loaded it almost immediately.

How?

What?
Sounds easy but actually if you use an image which has transparent areas, ie. has one color which will be transparent, the transparent pixels will be colored in with the page background color.

Why?
I want an image to display per row as a status marker for 3 different types of results: Success, Failure, Unknown. My images are circles with the background being transparent. I want the first column to display an image based on the status result.

If I simply insert an image, the report would use the background color of the report.
How?

Applies to:
  • Microsoft SQL Server Reporting Services (SSRS) 2008 R2
  • Microsoft Visual Studio 2012
  • Microsoft Business Intelligence Development Studio

What?
I recently revamped our standard report with a new template comprising of a single Tablix which contained the images of the corners and sides of the report. It looked beautiful if simply displayed on a single page (the top half of the page) as long as the end-user doesn't scroll. If the page was scrolled, what should display went behind my report and instead the whole report acted as a header on top of the scrolling content and would only ever display, the top rows of the dataset.

Why?
A lot of articles out there on the net are offering solutions that do the exact opposite. Basically, I want the opposite result of "Fixed headers while scrolling".

How?

Applies to:
  • Microsoft Windows 7 Professional
What?
Looking at ways of displaying different drives per user on a single computer. This one is by modifying the system registry, so if you aren't familiar with the system registry in MS Windows, you may need to find someone who is.

How?
As a proof of concept, let's see how to hide a specific drive. Note that this section applies to the currently logged-in user.

What?
This article details a method we used on a search form in a SQL Server Reporting Services (SSRS) environment. The requirement (amongst others) was that the report ran in less than a few seconds.

Analyzing the report through the ReportServer databases (internal auditing) only showed how long the SQL query would take to recover the data and present it in a report, which would average about 0.4 seconds.

We're obviously not interested in shaving off time from 0.4 seconds; no, we're more interested in the fact that 0.4 Microsoft seconds seems to translate to about 10 minutes in the real world. Where do the extra 9 minutes come from? Not the SQL as this runs in 00:00 seconds in SQL Server Management Studio. Not the internal processing and rendering as the report server says it did this in 0.4 seconds. So where's the problem?

How?

What?
A quick note on how to compare two columns for values that are not found in another. I have a column with old values, and now that I have a new list, I want a quick way to see what values are in the old column and which ones are new...

Why?
Consider the 3 following columns in an Excel spreadsheet:
copyraw
Old       New       Exists in Old?
--------- --------- --------------
123456    234567
234567    345678
345678    456789
567890    597890
  1.  Old       New       Exists in Old? 
  2.  --------- --------- -------------- 
  3.  123456    234567 
  4.  234567    345678 
  5.  345678    456789 
  6.  567890    597890 
I want the third column to say whether this is new or not.

How?
Category: Excel :: Article: 551

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

zoho   time   list   joomla   website   form   first   using   case   used   source   version   create   file   table   server   user   name   added   data   function   deluge   value   google   find   note   code   where   order   page   need   would   script   database   field   uploaded   system   display   mysql   files   creator   report   windows   following   license   parameter   client   error   work   date   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.