Home > Archive > MS SQL Server ODBC > January 2006 > Linking Excel and SQL









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Linking Excel and SQL
Preacher Man

2006-01-23, 11:23 am

NNTP-Posting-Host: bouldincorp.com 207.144.150.195
Path: TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.connect:48098 microsoft.public.sqlserver.newusers:5015 microsoft.public.sqlserver.odbc:45987 microsoft.public.sqlserver.olap:68107 microsoft.public.sqlserver.programming:579430 microsoft.public.sqlserv
er.server:421167 microsoft.public.sqlserver.clients:32562

I would like to link an Excel Spreadsheet to my SQL 2K Database. Where do I
need to start?

For example. I would like to have a cell in Excel that gives me the sum of
Sales Orders in my SQL Database. I would also like for this to be able to
change according to a date field in excel that can be set.

Thanks for any help.


Preacher Man

2006-01-23, 1:23 pm

NNTP-Posting-Host: bouldincorp.com 207.144.150.195
Path: TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.connect:48101 microsoft.public.sqlserver.newusers:5020 microsoft.public.sqlserver.odbc:45988 microsoft.public.sqlserver.olap:68110 microsoft.public.sqlserver.programming:579469 microsoft.public.sqlserv
er.server:421183 microsoft.public.sqlserver.clients:32564

So far I have tried using Microsoft Query, and I have entered my Select
statement. Here's another question though,

How do have a select statement that changes according to what is in a cell
in Excel. For Example:

Select <field> from <table> where <field>=<Cell in Excel>

"Preacher Man" <nospam> wrote in message
news:elnkSnDIGHA.3944@tk2msftngp13.phx.gbl...
>I would like to link an Excel Spreadsheet to my SQL 2K Database. Where do
>I need to start?
>
> For example. I would like to have a cell in Excel that gives me the sum
> of Sales Orders in my SQL Database. I would also like for this to be able
> to change according to a date field in excel that can be set.
>
> Thanks for any help.
>



Uri Dimant

2006-01-24, 7:23 am

NNTP-Posting-Host: bzq-25-106-78.cust.bezeqint.net 212.25.106.78
Path: TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.connect:48116 microsoft.public.sqlserver.newusers:5028 microsoft.public.sqlserver.odbc:45999 microsoft.public.sqlserver.olap:68144 microsoft.public.sqlserver.programming:579650 microsoft.public.sqlserv
er.server:421289 microsoft.public.sqlserver.clients:32572

Hi
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="c:\External\MyExcel.xls";
User ID=Admin;Password=;E
xtended properties=Excel 8.0')...Book1$





"Preacher Man" <nospam> wrote in message
news:elnkSnDIGHA.3944@tk2msftngp13.phx.gbl...
>I would like to link an Excel Spreadsheet to my SQL 2K Database. Where do
>I need to start?
>
> For example. I would like to have a cell in Excel that gives me the sum
> of Sales Orders in my SQL Database. I would also like for this to be able
> to change according to a date field in excel that can be set.
>
> Thanks for any help.
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com