You can also run ad hoc queries on any oledb datasource using the openrowset() method (again, if you're using sql server, and I'm pretty sure access supports something pretty similar)

It works by building the connection string like this:

SELECT a.*
FROM OPENROWSET('MSDASQL',
'DRIVER={SQL Server};SERVER=seattle1;UID=sa;PWD=MyPass',
pubs.dbo.authors) AS a
ORDER BY a.au_lname, a.au_fname

check out books online if using ss

At 03:31 PM 3/10/2003 +1100, you wrote:
If you are using SQLServer, check out the docs on using Linked servers. this
will give you the syntax for doing such a query.

It might be an idea though to wrap this up into a stored procedure.

Pat


"Jeremy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...
>
> Hi,
> I asked this before but I'm thinking it passed through the gaps and no one
> read it. So I'll post one more time. If no one responds then I will assume
> it can't be done.
>
> I have two servers both located in seperate locations.
> Server A has a table which I would like to copy and
> insert into Server B. What is the SQL syntax to achieve
> this?
>
> Currenly I have
>
> SELECT *
> INTO table_a (located at server B)
> FROM table_a (located at server A)
>
> I have tried to alter the FROM statement to have the
> server name i.e. FROM serverA.DatbaseName.TableA
>
> However this didn't work.
>
> Any ideas anyone?
>
> Jeremy
>
>
>
>
>



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Daniel Morphett
Web Developer, DBA
www.daemon.com.au ---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to