Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Import pdf files into SQL server database

Posted on 2014-02-24
3
Medium Priority
?
3,796 Views
Last Modified: 2016-02-10
I am very new at SQL server and I have been tasked with managing a SQL SERVER 2008. I need to be able to import a pdf file which has the indexing values in the name of the pdf file.

Ex.  accounts.administrative. account number.date open.pdf

Each name before the period would be an index value or column name. Is there a way to automatically read from a file on a windows directory and populate the proper columns in SQL so that the document can be searched using SentryFile.
0
Comment
Question by:samiam41
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39882903
I think you would be best served by creating an SSIS package to scan the target directory and input the tokenized values in your database.  T-SQL isn't great at working with the file system but SSIS will allow you to utilize C# or other scripting code to cycle through and manipulate the files.

Below is a blog post that does something similar that might get you on the right path:

http://agilebi.com/jwelch/2008/02/02/importing-files-using-ssis/
0
 
LVL 9

Author Comment

by:samiam41
ID: 39926925
Will review and respond ASAP.  Thanks.
0
 
LVL 15

Accepted Solution

by:
Vikas Garg earned 2000 total points
ID: 40031325
Hi,
You can also try following steps ...

>>  Open the PDF file in Acrobat Reader
>>  Click on Save As…
>>  Save the document as Text (Accessible) .txt (Flat File)
>>  Write a SSIS package importing data from Flat File to SQL server destination.


Below is the link to fetch data from flat file to SQL in ssis package

http://www.mssqltips.com/sqlservertip/2923/configure-the-flat-file-source-in-sql-server-integration-services-2012-to-read-csv-files/

OR

You can use MS sql Import export wizard to import the Text file data to SQL

http://technet.microsoft.com/en-us/library/ms141209.aspx
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question