Hi all,
I know how to use DTS create a package and use the cammand shell to call the
DTS package.
Is there a way to BCP a table into Excel using windows authentication
without creating the DTS package and calling it?
TIA,
Joe1.Use BULK INSERT
2 Opendatasource
INSERT INTO
OpenDataSource('Microsoft.Jet.OLEDB.4.0' ,
'Data Source="D:\testsource\testsource.xls";Extended properties=Excel
5.0')...sheet1$
SELECT col1,col2 from table_name
But, the excel should have the columns and should be on the server.
Hope this helps
--
"jaylou" wrote:
> Hi all,
> I know how to use DTS create a package and use the cammand shell to call t
he
> DTS package.
> Is there a way to BCP a table into Excel using windows authentication
> without creating the DTS package and calling it?
> TIA,
> Joe
>|||1. DO a BCP out to Text File
2. Convert the Text File to Excel
I would recommend this.
"Omnibuzz" wrote:
> 1.Use BULK INSERT
> 2 Opendatasource
> INSERT INTO
> OpenDataSource('Microsoft.Jet.OLEDB.4.0' ,
> 'Data Source="D:\testsource\testsource.xls";Extended properties=Excel
> 5.0')...sheet1$
> SELECT col1,col2 from table_name
> But, the excel should have the columns and should be on the server.
> Hope this helps
> --
>
>
> "jaylou" wrote:
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment