Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select from
Message
 
À
28/08/2001 00:29:54
Paul Healy
Pastel Consultants
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00549686
Message ID:
00549695
Vues:
17
Hi Paul,

The answer to both your questions is Yes.

You need to use a fully qualified table name - e.g.:

The following retrieves information from the FoxAUList tables in both the FoxAUList database and the MSDE_Article database:
select a.*, b.* 
  from msde_article..foxaulist a 
  inner join FoxAUList..FoxAUList b on a.memberid = b.memberid
The following copies the contents of the FoxAUList table in the FoxAUList database into a new table (also called FoxAUList in this case) in the MSDE_Article database:
use FoxAUList
select * into msde_article..foxaulist from foxaulist order by enrolled
GO
Note the double-dots in the syntax msde_article..foxaulist - there is a placeholder between the two of them for the implicit username. If you're logged in as the dbo, then unless you actually need to specify a user name (because there's more than one object with a particular name and you need to distinguish between them), then the double-dot notation will work fine. If you're not logged in as the dbo then your user name will be (automatically) used.

I'm assuming that you're talking about SQL-Server (because you mention T-SQL). Both these things are also possible in VFP.

Cheers,

Andrew


>Hi,
>
> Pardon my ignorance, but can anybody tell me if it is possible
>
> 1) to do a single query that will retrieve records from 2 tables that are in different databases ?
>
> 2) Or is it possible use any sort of T-SQL command that will help me copy data from Table1 in Database1 to Table2 in Database2 ?
>
>
>
>Thanks!


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform