|
-
May 12th, 1999, 06:56 PM
#1
Running a query that retrieve data from more than one table
Hi
Is it possible to run a query that retrieve data from more than one table using the CRecordset class?
Ex: "Select Table1.Name from Table1,Table2 where Table1.Number = Table2.Number "
If so, how can I do this?
thanks...
-
May 13th, 1999, 04:44 AM
#2
Re: Running a query that retrieve data from more than one table
Try this :
select distinctrow Table1.Name <and other fields...>
from Table1 inner join Table1 on Table1.Number = Table2.Number
Rajaraman
-
May 13th, 1999, 11:00 AM
#3
Re: Running a query that retrieve data from more than one table
Hi....
Can you send me an example code to use this query?
Thanks.....
-
May 20th, 1999, 12:14 PM
#4
Re: Running a query that retrieve data from more than one table
In your GetDefaultSQL function return
"Select Table1.Name from Table1,Table2"
Then when before you Requery, set m_strFilter = "Table1.Number=Table2.Number"
and execute Requery().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|