

Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to store binary image (BLOB) SQL server and load it into QlikView
Last Update:
May 11, 2021 3:20:29 PM
Updated By:
Created date:
Dec 4, 2013 7:01:08 AM
Storing an image as binary data in an SQL Server and then loading it into QlikView can be done as described in the steps below.
Environment:
- QlikView , all versions
- Create a table to contain the image as a varbinary or image
CREATE TABLE ImageAsVarBinary
(
ID int IDENTITY(1,1),
ImageName varChar(50),
varBinaryData varBinary(MAX)
);
- Load an image file to the table
INSERT INTO ImageAsVarBinary (ImageName, varBinaryData)
SELECT 'image1', BulkColumn FROM OPENROWSET (Bulk 'C:\Test.jpg', SINGLE_BLOB) AS varBinaryData;
- Load the image to QVW by using an info load
INFO SQL SELECT
ImageName,
varBinaryData
FROM "DB_TABLE_NAME".dbo.ImageAsVarBinary;
- Show the image in an object by setting the field value to
=INFO(ImageName)
- Set the field/object Representation to Image
NOTE:
- The syntax and SQL example above are based on Microsoft SQL Server 2008, but the principle should be the same on most SQL based database servers.
- For an example of fetching BLOB image from Oracle to QlikView, please refer to the community post at https://community.qlik.com/thread/141239
- See the attached qvw document for a demonstration
21,695 Views