September 19, 2008 at 8:04 am
I'm working for an Aviation product involving in an application integration with other system. My requirement is to store the PDF file contents into our sql server database, which I will be getting from other software system. I want to do this using SSIS and I would like to know the possible ways.
October 28, 2008 at 8:34 am
I would like to know a good way to
do this too, I suppose we have to use
BI studio and import column transformation
for this.
But because I really don't use BI studio,
a sample would be good... 🙂
Thx
October 31, 2008 at 1:03 pm
try this, substituting where specific
CREATE TABLE PDFImageTest (account_num integer,image_data VARBINARY(MAX));
DECLARE @AccountNum integer
SET @AccountNum = 2456789
INSERT INTO PDFImageTest (account_num,image_data)
SELECT @accountNum,image_data
FROM OPENROWSET(BULK N'C:\Backup\Disk Usage by Top Tables - 6262008 441 PM - PRDBTST2.pdf',SINGLE_BLOB) AS ImageSource(image_data);
Select * from PDFImageTest
-- Export image
declare @SQLcommand nvarchar(1000)
set @SQLcommand = 'bcp "SELECT image_data FROM PRDBDEV_UA.dbo.PDFImageTest" queryout "c:\backup\testExport.pdf" -T -n'
exec master.sys.xp_cmdshell @SQLcommand
go
November 21, 2008 at 2:25 am
Thanks!
Will try 🙂
November 16, 2010 at 3:47 am
Great ,it works OK!!
September 21, 2011 at 9:58 pm
im trying this, it had no problem on insertion, but when i use bcp command to retrieve it, no error prompt, but no file save into the path i've specified. Why? Please Advice, thanks...
September 27, 2011 at 8:13 am
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply