on 08-24-2015 8:18 AM
Hi all,
I have 2 tables in a master - detail relationship.
I want to create a datawindow where all the records from master table A are shown, and possible records from detail table B.
When there's no detail record in table B, i still want to show the master record from table A.
I've been playing around with the LEFT JOIN and UNION solutions , but the way i created my sql , results in a slow retrieval of the datawindow.
Any tips or idea's on how to accomplish this please ?
TIA
John
Be aware that a UNION performs a sort to eliminate duplicates. Do you want that? If not, use UNION ALL. Also, how are you joining? Is your SQL doing full table scans by any chance? Do you have properly indexed columns as part of the join condition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why don't use 2 datawindows? 1 for master and 1 for detail. At rowfocuschanged event inside dw_master, add the script to retrieve dw_detail with the retrieval argument parameter(s).
Each dw represent each table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.