Showing posts with label follows. Show all posts
Showing posts with label follows. Show all posts

Sunday, March 11, 2012

Another Question

I want to create a horizontal table as follows:
Ingot 12345 12345 12345
Traveler 98786 87657 77675
Pieces 15 20 12
Step 1 x x x
Step 2 x x x
Step 3 x x x
Step 4 x x x
Step 5 x x x
Step 6 x x
Step 7 x x
...
Step 19
As you can see the columns for the steps are fixed. I know which step each
traveler is on so I want to populate the table with x's until I get to the
last step. As you can see from this report, the first and third travelers
are about the same and the second is stuck on step 5. The managers can look
at this and see that the second traveler will produce a hole later on. So
how could I create this table in SSRS? Keep in mind the steps are
predefined and will not change. So the information returned from the query
would be similar to the following
Ingot, Traveler, Pieces, Step
12345 98786 15 7
12345 87657 20 5
12345 77675 12 7
...
Thanks.On May 11, 2:39 pm, "John Wright" <riley_wrig...@.hotmail.com> wrote:
> I want to create a horizontal table as follows:
> Ingot 12345 12345 12345
> Traveler 98786 87657 77675
> Pieces 15 20 12
> Step 1 x x x
> Step 2 x x x
> Step 3 x x x
> Step 4 x x x
> Step 5 x x x
> Step 6 x x
> Step 7 x x
> ...
> Step 19
> As you can see the columns for the steps are fixed. I know which step each
> traveler is on so I want to populate the table with x's until I get to the
> last step. As you can see from this report, the first and third travelers
> are about the same and the second is stuck on step 5. The managers can look
> at this and see that the second traveler will produce a hole later on. So
> how could I create this table in SSRS? Keep in mind the steps are
> predefined and will not change. So the information returned from the query
> would be similar to the following
> Ingot, Traveler, Pieces, Step
> 12345 98786 15 7
> 12345 87657 20 5
> 12345 77675 12 7
> ...
> Thanks.
You will most likely want to use a matrix report where the pivoted
column (say Column_x) can have values: Ingot, Traveler and Pieces and
then have a normal column called Step. So your stored procedure/query
that will be sourcing the report should have an output like the
following:
Column_x Value Step
-- -- --
Ingot 12345 7
Traveler 98786 7
Pieces 15 7
Ingot 12345 5
Traveler 87657 5
Pieces 20 5
Ingot 12345 7
Traveler 77675 7
Pieces 12 7
Where Column_x will be the pivot column (it will turn into 3 columns
in the report: Ingot, Traveler and Pieces). Value will be the details
displayed for the pivot column. And Step is the row value (amounting
to a column). Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Saturday, February 25, 2012

Annoying Inner Join Problem

Greetings SSIS friends,

I have the following problem in SSIS and it's driving me nuts!!!!!

My situation is as follows :

Data Source 1 & Data Source 2are joined using a merge join. This bit works fine.

The output of the above join is then joined to a third data source but this time, I only get 63 rows coming through instead of 77097 even though the join key in the second merge join component is the same as the first one!!!

I thought I was going mad so I decided to see if the same problem occurs if I was to do this with T-SQL. I created 3 temporary tables for each of my data sources.

I did an inner join between tmpTable_Source1 and tmpTable_Source2, I then stored the result in tempTable4

The final inner join was performed between tempTable4 and tempTable3 and the result produced 77097 and not 63 rows.

What the hell is SSIS playing at?! The merge keys I used in T-SQL is the same one I used in my SSIS package!!!!

Are all the inputs of your merge joins actually sorted? The inputs require to be sorted; otherwise you will get unexpected results.|||

Hi Rafael,

Yes my inputs are sorted but anyway, I decided to do away with one of my data sources and combined it as part of the SQL command in my second data source.

Now I have another problem!!!

In my UNION ALL component I get an error for one of my Input fields. It says that the metadata for my input column does not match with the metadata for the associated output column. The trouble is, this was working just fine before and I haven't touched it!!!!

What would cause this kind of problem?!!

Your help would be much appreciated.

|||

Sorry Rafael,

I've solved this little problem. Looks like the data type for one of my input columns was a unicode string.

I will look in to your idea with the other saved package that I've got. Still unsure aboutt the ordering business but will try it and let you know.

Thanks for your help.

|||

Union all transforms are not very friendly when refreshing metadata. I have found faster to delete the faulty column mapping inside of the lookup and added it back. To delete it select the whole row representing the column with the problem and select delete from the right click menu. Then add it back using the drop down lists. Alternative, you could delete the whole Union all and place it back.