DB Merging Two Sources

Results 1 to 2 of 2

Thread: DB Merging Two Sources

  1. #1
    Join Date
    Dec 1969

    Default DB Merging Two Sources

    I want to be able to search two databases on different servers. I can get the data from the respective servers into a recordsets and the tables are identical. But the issue I am having is how to combine these two recordsets and sort them by titles. I have been thinking of ways to do this and want to see if there are other ways to do it. <BR><BR>1) take each recordset and put into arrays. then combine the two arrays and sort. then display information. Are there features to recordset to allow for multiple sql returned data to be merged?<BR><BR>2) looking for a way to query over two databases. Is it possible to join two tables from two different databases? Either from the SQL server side or using ASP scripting?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Not hard...read docs...

    &#062; Is it possible to join two tables from two different databases?<BR><BR>Yes, of course.<BR><BR>Bookmark this:<BR>http://msdn.microsoft.com/library/en-us/tsqlref/ts_syntaxc_9kvn.asp<BR><BR>In left panel, click on SELECT and get to:<BR>http://msdn.microsoft.com/library/en-us/tsqlref/ts_sa-ses_9sfo.asp<BR><BR>See "FROM Clause", which tells you to see "FROM" keyword for more info:<BR>http://msdn.microsoft.com/library/en-us/tsqlref/ts_fa-fz_4ox9.asp<BR><BR>Read.<BR><BR>Read the pages that this links to.<BR><BR>Summary: You can even link to non-SQL Server DBs, using the OpenDataSource function. It&#039;s even easier with SQL Server DBs.<BR><BR>**************<BR><BR>You don&#039;t really want to JOIN these tables, do you? It sounds like you want to simply do a SELECT in each table and then do a UNION ALL to get all the records into a single recordset, no?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts