Union of two tables in different databases from within a VB6 application
smeechie_at_yahoo.com
Date: 02/22/05
- Next message: Jason: "trigger"
- Previous message: Gary: "Regarding indexes (I think)"
- Next in thread: Anith Sen: "Re: Union of two tables in different databases from within a VB6 application"
- Reply: Anith Sen: "Re: Union of two tables in different databases from within a VB6 application"
- Messages sorted by: [ date ] [ thread ]
Date: 22 Feb 2005 12:18:35 -0800
>>From within SQL Query analyzer, I can create the union of two different
tables located in separate databases (on the same server). This works
fine. How can I achieve the same result programmatically (using VB6)??
Since the tables are in different databases ... do I need one
connection string for each database?? Or is there a better / more
efficient way to do this? The Union in Query analyzer looks like this:
(the value for 'AAA' is passed to the query via the VB6 application.
==================
Select ID, Description, Qty from XXXX2.dbo.PART where ID like '%AAA%'
Union ALL
Select PartNum, Manu, Available from YYYY2.dbo.PART2 where PartNum like
'%AAA%'
==================
Any help would be appreciated. Thanks so very much for any help..
Don-
- Next message: Jason: "trigger"
- Previous message: Gary: "Regarding indexes (I think)"
- Next in thread: Anith Sen: "Re: Union of two tables in different databases from within a VB6 application"
- Reply: Anith Sen: "Re: Union of two tables in different databases from within a VB6 application"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|