Showing posts with label documents. Show all posts
Showing posts with label documents. Show all posts

Monday, March 19, 2012

How to import word documents into SQL Server

Hi All,

I need to import multiple word documents of same structure into SQL Server table. Could anyone suggest the way of doing this?

Thanks,

What do you mean, "the same structure"? Do you want to extract informaiton from the documents or just store each one as a BLOB? If the latter, the 'Import Column' component should work for you.

-Jamie

|||I mean i want to extract information from word documents into sql server tables.|||

Hemal Shah wrote:

I mean i want to extract information from word documents into sql server tables.

I'm not sure really. This isn't a common request seeing as Word documents are not structured files. The normal answer to extracting unstructured data using SSIS is that you're going to have to use code. You can download Primary Interop Assemblies for Office that enable you to interact with Word documents using dotnet code - hence you can use them in a script task/component.

-Jamie

How to import word document to sql server?

How can I import my word documents into SQL server 2000?> How can I import my word documents into SQL server 2000?
i assume what you want is to insert them into a table?
You're going to want to create a table with a column of type "image", which
is a BLOB field (Binary Large OBject).
Then you'll want to read the documentation on your database access
technology (ADO, OLEdb, ODBC, Hibernate, etc) on how to insert blobs into a
table.|||Futher to Ian's post, some ADO.NET examples (in c#):
stream=>database
http://groups.google.co.uk/group/mi...>
7e3782e59a93
database=>stream
http://groups.google.co.uk/group/mi...>
73f1db2951f1
Marc|||Thank you very much Ian & Marc, it was helpful and I really appriciate it
"Raghad" wrote:

> How can I import my word documents into SQL server 2000?|||This works in MSSQL 2005 (untested in 2000). It assumes that the file is
accessible by the server (on one of its local disks, or a network shared
drive). This example updates an existing record, but you could do something
similar with an insert. I do it this way because I don't have the photo yet
when I first create the record.
CREATE TABLE [dbo].[COURSES](
[COURSEID] [int] PRIMARY KEY IDENTITY(1,1) NOT NULL,
[COURSENAME] [nvarchar](40) NOT NULL,
[MAP] [varbinary](max) NULL
)
GO
create procedure spInsertPhoto
@.inCourseID int,
@.inPhotoFileName nvarchar(100)
AS
declare @.SQL nvarchar(1000)
set @.SQL =
'UPDATE COURSES
SET MAP = (
SELECT Photo.*
FROM OPENROWSET
(BULK '+ QUOTENAME(@.inPhotoFileName, '''') + ' , SINGLE_BLOB) Photo)
WHERE courseid = ' + cast(@.inCourseID as varchar)
exec (@.SQL)
GO
insert into COURSES
values('Test Course', NULL)
GO
exec spInsertPhoto 1, 'c:\temp\test2.jpg'
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Raghad" <Raghad@.discussions.microsoft.com> wrote in message
news:52A8884D-4DAD-4713-AC71-67ACAC99A993@.microsoft.com...
> How can I import my word documents into SQL server 2000?|||AQ> This works in MSSQL 2005 (untested in 2000). It assumes that the
AQ> file is accessible by the server (on one of its local disks, or a
AQ> network shared drive).
The bulk provider isn't support for OpenRowSet in 2000. :)
Thanks,
Kent Tegels
http://staff.develop.com/ktegels/

How to import word document to sql server?

How can I import my word documents into SQL server 2000?
> How can I import my word documents into SQL server 2000?
i assume what you want is to insert them into a table?
You're going to want to create a table with a column of type "image", which
is a BLOB field (Binary Large OBject).
Then you'll want to read the documentation on your database access
technology (ADO, OLEdb, ODBC, Hibernate, etc) on how to insert blobs into a
table.
|||Futher to Ian's post, some ADO.NET examples (in c#):
stream=>database
http://groups.google.co.uk/group/microsoft.public.dotnet.languages.csharp/msg/314e7e3782e59a93
database=>stream
http://groups.google.co.uk/group/microsoft.public.dotnet.languages.csharp/msg/fcd173f1db2951f1
Marc
|||This works in MSSQL 2005 (untested in 2000). It assumes that the file is
accessible by the server (on one of its local disks, or a network shared
drive). This example updates an existing record, but you could do something
similar with an insert. I do it this way because I don't have the photo yet
when I first create the record.
CREATE TABLE [dbo].[COURSES](
[COURSEID] [int] PRIMARY KEY IDENTITY(1,1) NOT NULL,
[COURSENAME] [nvarchar](40) NOT NULL,
[MAP] [varbinary](max) NULL
)
GO
create procedure spInsertPhoto
@.inCourseID int,
@.inPhotoFileName nvarchar(100)
AS
declare @.SQL nvarchar(1000)
set @.SQL =
'UPDATE COURSES
SET MAP = (
SELECT Photo.*
FROM OPENROWSET
(BULK '+ QUOTENAME(@.inPhotoFileName, '''') + ' , SINGLE_BLOB) Photo)
WHERE courseid = ' + cast(@.inCourseID as varchar)
exec (@.SQL)
GO
insert into COURSES
values('Test Course', NULL)
GO
exec spInsertPhoto 1, 'c:\temp\test2.jpg'
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Raghad" <Raghad@.discussions.microsoft.com> wrote in message
news:52A8884D-4DAD-4713-AC71-67ACAC99A993@.microsoft.com...
> How can I import my word documents into SQL server 2000?
|||AQ> This works in MSSQL 2005 (untested in 2000). It assumes that the
AQ> file is accessible by the server (on one of its local disks, or a
AQ> network shared drive).
The bulk provider isn't support for OpenRowSet in 2000.
Thanks,
Kent Tegels
http://staff.develop.com/ktegels/

Friday, February 24, 2012

How to identify the Reporting Services Edition

Hi all, I need to know the reporting services, if it is Enterprise, Standard
or Developer. I found only documents that tell me how to identify the
version, but not the edition.
Anyone knows how to do this'
Thank you very much!!!
Alexandre Calderaro
Avanade Italy
MSCDBASorry,
After post the question I found the answer in the most obvious place:
Control Panel, Add Remove Programs...
Anyway
Thanks
"Alex" wrote:
> Hi all, I need to know the reporting services, if it is Enterprise, Standard
> or Developer. I found only documents that tell me how to identify the
> version, but not the edition.
> Anyone knows how to do this'
> Thank you very much!!!
> Alexandre Calderaro
> Avanade Italy
> MSCDBA
>|||For 2000, the version information is located at the bottom of the main page
of your Report Server
RTM: 8.00.743.00
SP1 : 8.00.878.00
SP2 : 8.00.1038.00
The edition information is stored in the following registry key:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Reporting
Services\ProductCode
Standard: {B19FEFE7-069D-4FC4-8FDF-19661EAB6CE4}
Enterprise: {33FE9EED-1976-4A51-A7AF-332D9BBB9400}
Developer: {2879CA50-1599-4F4B-B9EC-1110C1094C16}
Evaluation: {7C93251A-BFB4-4EB8-A57C-81B875BB12E4}
Med Bouchenafa
"Alex" <Alex@.discussions.microsoft.com> a écrit dans le message de news:
92C3C825-D8BB-43C5-9342-F4807D12D157@.microsoft.com...
> Hi all, I need to know the reporting services, if it is Enterprise,
> Standard
> or Developer. I found only documents that tell me how to identify the
> version, but not the edition.
> Anyone knows how to do this'
> Thank you very much!!!
> Alexandre Calderaro
> Avanade Italy
> MSCDBA
>