I hope some SQL guru in here can help...
I have 3 tables...
* investors
- inv_id
-inv_name
- etc...
* fund_accounts
- id
- acct_id
- acct_name
- fund_id
- fund_accounts_record_status
* investor_accounts
- id
- acct_id
- inv_id
- fund_id
- fund_accounts_record_status
All accounts will go into "fund_accounts". Each will be unique.
Invstor relationship to accounts go into "investor_accounts" keyed
off "acct_id".
When a relationship is created, a record in INSERTed into
"investor_accounts" with the "investor_id" and the "account_id" as
the link between the other tables.
My SQL pulls data from these tables fine. (sort of)
I get lists of active (record_status = 'a') accounts by fund with
associated Investor name (if it has one), if no investor is
associated with an account, the "derived" field (inv_name) is left
blank.
I get lists of active accounts by investor.
I get lists of active accounts *not* associated with an investor.
My problem is when an investor_account record is marked inactive
(record_status = 'd').
The list of active accounts will not return an account that is
marked inactive in the investor_account table, even though it is
still marked active in the fund_accounts table.
I want to out of the DB...
All active acct_id, acct_name, and give inv_id and inv_name if the
investor_accout record is marked 'active', but still give me an
active account if the investor_account record is marked 'inactive'.
Help!
Thx
Walter
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~->
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/