Showing posts with label items. Show all posts
Showing posts with label items. Show all posts

Friday, March 30, 2012

Merge join more than 2 tables

I need to take certain items of data from four different tables and out them into one table.

Unfortunately my source data's version of SQL does not support the LEFT JOIN keyword which has left me with a bit of a problem.

I saw the merge join in SSIS and used it to get data from two of the tables and stick them in the destination and it all worked fine.

That got me thinking, is it possible to create a second merge join transformation within the same data flow task for the remaining two tables and then join the output of both the merge joins to give me the data I need from all four tables in one output?

I cannot answer your direct question about the merge join, but wanted to make one comment. It is possible to recast a Left Join query as a Union and this might be a viable approach for your problem. The general form is to make a Union of the simple Join and a Not IN query.

Friday, March 23, 2012

Merge a graphic image with a result set via SQL/Stored Proc

SQL Server 2000
================================== Howdy All -
I have a table of inventory items with a PK of itemnum (varchar(30)).
I have very small image files (gifs) that I wish to merge with the
resultset of a query to use in reporting. Each image file has a name
that matches extactly with itemnum PK it belongs to.
How can I load the images and return the data nd images to my
reporting system?
Yes, I know it is not pretty. I know how to do it in concept but what
do I use to read in the file image?
Thanks,
CraigHi Criag
You may find this useful
http://databases.aspfaq.com/database/should-i-store-images-in-the-database-or-the-filesystem.html
and http://support.microsoft.com/default.aspx?scid=kb;en-us;258038
The displaying of the images is dependent on what your client is, for
instance Reporting services has an image control.
John
"Craig" wrote:
> SQL Server 2000
> ==================================> Howdy All -
> I have a table of inventory items with a PK of itemnum (varchar(30)).
> I have very small image files (gifs) that I wish to merge with the
> resultset of a query to use in reporting. Each image file has a name
> that matches extactly with itemnum PK it belongs to.
> How can I load the images and return the data nd images to my
> reporting system?
> Yes, I know it is not pretty. I know how to do it in concept but what
> do I use to read in the file image?
> Thanks,
> Craig
>