| Author |
Select query from a file
|
|
|
| Is there a way to create a Select query using a file without having to import
it into a table. I need to match inventory data that is in an excel file via
UPC column to our inventory table in the SQL server.
Thanks in advance..
| |
| Sue Hoegemeier 2006-01-24, 9:23 am |
| You can use Opendatasource to query the Excel file. An
example would be something like:
SELECT *
FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source="C:\YourExcelFile.xls";
User ID=Admin;Password=;E
xtended properties=Excel
8.0')...Sheet1$
-Sue
On Mon, 23 Jan 2006 14:07:57 -0800, "Bigal"
<Bigal@discussions.microsoft.com> wrote:
>Is there a way to create a Select query using a file without having to import
>it into a table. I need to match inventory data that is in an excel file via
>UPC column to our inventory table in the SQL server.
>
>Thanks in advance..
| |
|
| Could I then create a Join to a table in SQL server ?
"Sue Hoegemeier" wrote:
> You can use Opendatasource to query the Excel file. An
> example would be something like:
> SELECT *
> FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
> 'Data Source="C:\YourExcelFile.xls";
> User ID=Admin;Password=;E
xtended properties=Excel
> 8.0')...Sheet1$
>
> -Sue
>
> On Mon, 23 Jan 2006 14:07:57 -0800, "Bigal"
> <Bigal@discussions.microsoft.com> wrote:
>
>
>
| |
| Sue Hoegemeier 2006-01-24, 8:23 pm |
| Yes - you can reference just like you would a table. There
is a similar example in books online under openrowset. You'd
go about it the same way.
-Sue
On Tue, 24 Jan 2006 13:05:25 -0800, "Bigal"
<Bigal@discussions.microsoft.com> wrote:
[color=darkred]
>Could I then create a Join to a table in SQL server ?
>
>"Sue Hoegemeier" wrote:
>
| |
|
| Great.
Thanks
"Sue Hoegemeier" wrote:
> Yes - you can reference just like you would a table. There
> is a similar example in books online under openrowset. You'd
> go about it the same way.
>
> -Sue
>
> On Tue, 24 Jan 2006 13:05:25 -0800, "Bigal"
> <Bigal@discussions.microsoft.com> wrote:
>
>
>
|
|
|
|