Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Friday, March 30, 2012

MS SQL(2000) table export to excel

I′m looking for a script (sql transaction, or function) to export MS
SQL(2000) Table to formated excel sheet (cells width, text format, ...).how about using the DTS
to export that to excel
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"Milo?" wrote:

> I′m looking for a script (sql transaction, or function) to export MS
> SQL(2000) Table to formated excel sheet (cells width, text format, ...).|||Milo?,
You also can use BCP command. See Books Online.
Regards,
"Milo?" wrote:

> I′m looking for a script (sql transaction, or function) to export MS
> SQL(2000) Table to formated excel sheet (cells width, text format, ...).|||Thank You Jose,
DTS export ist very easy, for my situation is the best, but it has litlle
problem with text encoding.
Milo?
?Jose G. de Jesus Jr MCP, MCDBA" nap_sal (nap_sala):
> how about using the DTS
> to export that to excel
>
> --
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "Milo?" wrote:
>sql

Monday, March 12, 2012

MS SQL Linked Server Issue

This is a multi-part message in MIME format.
--=_NextPart_000_0034_01C86DA3.377E73B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi All,
I am have created a linked server in MS SQL 2000 to Sage Line 50v12 = using the ODBC drivers in sage.I am able to view all the tables once I = clicked on the link server link in the SQL enterprise manager. However = when I run the below query I get only one records instead of 28.
SELECT * FROM OPENQUERY(SageL50, 'SELECT * from Sales_Ledger')
I am running SQL 2000 server with SP4
From the SQL online documentation I got to know that OPENQUERY returns = only a single record. Is there any other function/command that will = enable me to get all the records from a table from a linked server?
Can you let me know I am missing here?
Thanks and Regards,
Saurabh
--=_NextPart_000_0034_01C86DA3.377E73B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi All,

I am have created a linked server in = MS SQL 2000 to = Sage Line 50v12 using the ODBC drivers in sage.I am = able to view all the tables once I clicked on the link server link in the SQL = enterprise manager. However when I run the below query I get only one records = instead of 28.

SELECT * FROM OPENQUERY(SageL50, = 'SELECT * from Sales_Ledger')

I am running SQL 2000 server with SP4

From the SQL online documentation I = got to know that OPENQUERY returns only a single record. Is there any other = function/command that will enable me to get all the records from a table from a linked server?

Can you let me know I am = missing here?

Thanks and Regards,
Saurabh
--=_NextPart_000_0034_01C86DA3.377E73B0--This is a multi-part message in MIME format.
--=_NextPart_000_000F_01C86EEC.F996B580
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
Any updates on the below query.
Thanks and Regards,
Saurabh
"news" <news@.microsoft.com> wrote in message =news:%23b2csSXbIHA.484@.TK2MSFTNGP06.phx.gbl...
Hi All,
I am have created a linked server in MS SQL 2000 to Sage Line 50v12 =using the ODBC drivers in sage.I am able to view all the tables once I =clicked on the link server link in the SQL enterprise manager. However =when I run the below query I get only one records instead of 28.
SELECT * FROM OPENQUERY(SageL50, 'SELECT * from Sales_Ledger')
I am running SQL 2000 server with SP4
From the SQL online documentation I got to know that OPENQUERY returns =only a single record. Is there any other function/command that will =enable me to get all the records from a table from a linked server?
Can you let me know I am missing here?
Thanks and Regards,
Saurabh
--=_NextPart_000_000F_01C86EEC.F996B580
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Hi,
Any updates on the below =query.
Thanks and Regards,
Saurabh
"news" wrote in message news:%23b2csSXbIHA.4=84@.TK2MSFTNGP06.phx.gbl...
Hi All,

I am have created a linked server =in MS SQL 2000 =to Sage Line 50v12 using the ODBC drivers in =sage.I am able to view all the tables once I clicked on the link server link in =the SQL enterprise manager. However when I run the below query I get only one =records instead of 28.

SELECT * FROM OPENQUERY(SageL50, ='SELECT * from Sales_Ledger')

I am running SQL 2000 server with SP4

From the SQL online documentation I =got to know that OPENQUERY returns only a single record. Is there any other function/command that will enable me to get all the records from a =table from a linked server?

Can you let me know I am =missing here?

Thanks and Regards,
Saurabh

--=_NextPart_000_000F_01C86EEC.F996B580--|||Did you try:
SELECT * FROM SageL50.<database>.<owner/schema>.Sales_Ledger
Replace <database> with the database that contains the table you want,
and the <owner/schema> with the owner of the table - generally dbo.
Example:
SELECT * FROM SageL50.db1.dbo.SalesLedger;
Jeff
news wrote:
> Hi,
> Any updates on the below query.
> Thanks and Regards,
> Saurabh
>
> "news" <news@.microsoft.com <mailto:news@.microsoft.com>> wrote in
> message news:%23b2csSXbIHA.484@.TK2MSFTNGP06.phx.gbl...
> Hi All,
> I am have created a linked server in MS SQL 2000 to Sage Line
> 50v12 using the ODBC drivers in sage.I am able to view all the
> tables once I clicked on the link server link in the SQL
> enterprise manager. However when I run the below query I get only
> one records instead of 28.
> SELECT * FROM OPENQUERY(SageL50, 'SELECT * from Sales_Ledger')
> I am running SQL 2000 server with SP4
> From the SQL online documentation I got to know that OPENQUERY
> returns only a single record. Is there any other function/command
> that will enable me to get all the records from a table from a
> linked server?
> Can you let me know I am missing here?
> Thanks and Regards,
> Saurabh
>