Re: Updating MDB via OpenQuery
From: Jeff Dillon (jeff_at_removeemergencyreporting.com)
Date: 10/28/04
- Next message: Bertrand: "Re: SQL Stored Procedures"
- Previous message: Shahid Juma: "Check to see if query is valid"
- In reply to: Jesse Beveridge: "Re: Updating MDB via OpenQuery"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 28 Oct 2004 10:56:16 -0700
Now, how do I drop a table?
I've tried select * from OPENQUERY(ACCESS, 'drop table TestTable')
which returns:
Error: OLE DB Provider Microsoft.Jet.OLEDB.4.0 indicates that the object has
no columns
then I tried
I've tried select * from OPENQUERY(ACCESS, 'drop table TestTable;select 1')
but says
"Syntax error in DROP TABLE statement"
Any ideas?
thx
Jeff
"Jesse Beveridge" <jesse@nospam.nospam> wrote in message
news:OIGv8DRvEHA.1296@TK2MSFTNGP10.phx.gbl...
> Try:
> insert openquery(ACCESS, 'select * from accounts where 1=2')
> select * from Accounts_View
>
> This assumes that Accounts_View has the same column order that the access
> table has, otherwise you should provide a column list.
>
> -- Jesse
>
>
> "Jeff Dillon" <jeff@removeemergencyreporting.com> wrote in message
> news:OpUlY5QvEHA.4072@TK2MSFTNGP15.phx.gbl...
> > I've created a linked server named ACCESS in my local instance of
SQL2000.
> >
> > This works:
> >
> > select * from openquery(ACCESS, 'select * from accounts')
> >
> > Now, I would like to insert all records from the SQL view
'Accounts_View'
> > into the corresponding Access table 'Accounts'
> >
> > What would the appropriate openquery syntax be?
> >
> > thx
> >
> > Jeff
> >
> >
>
>
- Next message: Bertrand: "Re: SQL Stored Procedures"
- Previous message: Shahid Juma: "Check to see if query is valid"
- In reply to: Jesse Beveridge: "Re: Updating MDB via OpenQuery"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|