In a nutshell, I have inherited a database full of relationships (which is good), but poorly designed. All I've done is add a new table to the query and a new field to search on. Here's the query:
<CFQUERY NAME="readesi" DATASOURCE="esidb1">
SELECT DISTINCT tblmasterclients.ClientName, AliasName, AlphaPrefix, SiteID, Infinity, AuthCode, POBox, POBoxCombo, tblmasterclients.Comments, DID,
SVCType, tblmasterclients.AcctStatus, PreparedDate, URL, TerminationReason, TerminationDesc, billingaddr, billingaddr2, billingstate, billingcity,
billingzip, billingcontact, billingemail, billingphone, billingext, billingfaxnumber, billingcellnumber, leaseid
FROM tblMasterClients, tblbillingaddr, tblterm
where tblmasterclients.clientname = "tblbillingaddr.Client Name"
and tblmasterclients.clientname = tblterm.clientname
and tblterm.leaseid = tblbilling.leaseid
and tblmasterclients.acctstatus = 'A'
OR tblmasterclients.acctstatus = 'ACT'
ORDER BY tblmasterclients.clientname
</CFQUERY>
Note: leaseid field and anything related to tblterm is new part I'm adding.
Thanks for any help!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

