Hi all,
I need to query data from at least 2 MDB files that have a common CardNo
field. The tables that hold those info are in different MDBs, how can I
run select SQL statement under VB.NET environment?
For example:
In A.MDB, table CardInfo has fields CardNo and Name
In B.MDB, table Record has fields CardNo, Date, Controller
So what is the select phrase like,
Select
[a.cardinfo.cardno],[a.cardinfo.name],[b.record.date],[b.record.controller]
From [a.cardinfo],[b.record]
where [a.cardinfo.cardno]=[b.record.cardno]
Thanks.
--
Best regards,
RL 2 1225
On Tue, 31 May 2005 10:01:23 +0800, "Lurc" <lu*****@spam.hotmail.com> wrote:
¤ Hi all,
¤
¤ I need to query data from at least 2 MDB files that have a common CardNo
¤ field. The tables that hold those info are in different MDBs, how can I
¤ run select SQL statement under VB.NET environment?
¤
¤ For example:
¤ In A.MDB, table CardInfo has fields CardNo and Name
¤ In B.MDB, table Record has fields CardNo, Date, Controller
¤
¤ So what is the select phrase like,
¤ Select
¤ [a.cardinfo.cardno],[a.cardinfo.name],[b.record.date],[b.record.controller]
¤ From [a.cardinfo],[b.record]
¤ where [a.cardinfo.cardno]=[b.record.cardno]
¤
¤ Thanks.
See if the below works for you. Make sure to connect to database A.MDB and change the DATABASE path
in the SQL statement to the location of database B.MDB.
"SELECT CardInfo.[CardNo], CardInfo.[Name], Record.[Date], Record.Controller FROM CardInfo INNER
JOIN [MS Access;DATABASE=C:\My Databases\B.mdb;].[Record] ON (CardInfo.[CardNo]=Record.[CardNo])"
Paul
~~~~
Microsoft MVP (Visual Basic) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: netpurpose |
last post by:
I need to extract data from this table to find the lowest prices of
each product as of today. The product will be listed/grouped by the
name only, discarding the product code - I use...
|
by: Joe Stanton |
last post by:
Hello Group
I have a query that works in Oracle and SQL Server, but fails in Microsoft
Access.
The query is:
SELECT data fromTABLE1 WHERE data>='A&' AND data<'A'''
Here is my sample data:
|
by: Martin Lacoste |
last post by:
Ok, before I headbutt the computer... don't know why when I add
criteria in a query, I get an 'invalid procedure call'. I also don't
know why after searching the help in access, the various access...
|
by: jjturon |
last post by:
Can anyone help me??
I am trying to pass a Select Query variable to a table using Dlookup
and return the value to same select query but to another field.
Ex.
SalesManID ...
|
by: tizmagik |
last post by:
I am having a lot of difficulty generating a CrossTab Query based
report. I have looked online for several tutorials and whatnot but I
have not been able to really find what I'm looking for, nor...
|
by: rdemyan via AccessMonster.com |
last post by:
My application has a table that contains information on buildings. The
building data comes from another database and is imported from a spreadsheet
into my application.
Originally, I thought...
|
by: Wired Hosting News |
last post by:
I tried to be breif and give a scenario so as not to be overlooked because
it was soooo long. Let me give you real world.
I am a manufacturer of goods and produce 11 items that are distributed...
|
by: John T Ingato |
last post by:
If I run a query that calculates the sales data for all the inventory level
in a table, how do I go about saving that sales data into a permanent table?
I plan I using this sales data often, and...
|
by: ARC |
last post by:
Hello all,
So I'm knee deep in this import utility program, and am coming up with all
sorts of "gotcha's!".
1st off. On a "Find Duplicates Query", does anyone have a good solution for...
|
by: lindabaldwin |
last post by:
Hello everyone,
I am fairly new to VBA. I have a worksheet in Excel, named "Data Sheet" from which I am trying to query data. This worksheet contains the following data: unit (column A), date...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |