|
-
Jan 25th, 2000, 06:11 AM
#1
Thread Starter
Junior Member
I'm trying to access data from two different tables and display them both in the details section of a data report. Can anybody help?
PS I'm using VB6 data report and SQL 7.
Thanks,
Eddie
-
Jan 26th, 2000, 02:21 AM
#2
New Member
You need to use a join statement in SQL but this can get very complicated depending on the join you want to do. Give what you want to do and all.
-
Jan 26th, 2000, 03:04 AM
#3
Thread Starter
Junior Member
What I'm creating is a worker's comp program. And in this program, it prints checks to various claimants. I am using the VB Data Report designer to print my checks. I need to display, in the details section, data from two different tables. The two tables I am grabbing data from are 'CLAIMS' and 'PAYMENTS'. There's information from both that need to be displayed on the check. Does that give a better explanation of what I'm doing?
Eddie
-
Jan 26th, 2000, 09:44 PM
#4
New Member
Well my friend! If you plan to use VB Data Report don't expect to be able to do much. I gather that you just want to do an inner join. I suggest that you use a query to produce your joint recordset and then all you have to do is place the data on the Report... much less head ache...
I wish you all the best !!!
-
Jan 27th, 2000, 10:09 AM
#5
Frenzied Member
Create a view (you can do it in SQL Server, which you've indicated you're using). You access views in the same fashion that you do tables. For example
Create View v_Claim_pay
as
Select claims.reference, payment.invoice
from claims, payment
where condition
You then access v_Claim_Pay as though
it were a table:
select * from v_Claim_Pay
[This message has been edited by JHausmann (edited 01-28-2000).]
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
|