Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Losing $where when fixed selection is not present
Re: Losing $where when fixed selection is not present [message #2265 is a reply to message #2242] Mon, 17 August 2009 06:57 Go to previous messageGo to previous message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Tony, with further more detailed testing I've found that this isn't completely fixed under certain conditions.

If I run the OUTPUT2 task without making any specific selections (i.e. a complete report) the following SQL is generated:

SELECT cost_group_charge.*, cost_group.cost_group_desc, school.school_name  
FROM cost_group_charge  
LEFT JOIN cost_group ON (cost_group.cost_group_id=cost_group_charge.cost_group_id)  
LEFT JOIN school ON (school.school_id=cost_group_charge.rdcaccount_id)  
WHERE cost_group_charge.rdcaccount_id='7'    
ORDER BY cost_group_charge.age_group_id, cost_group_seq_nbr, cost_group_charge.banner_req  =>Count=86


However, if I make a couple of selections before running the report the SQL is:

SELECT cost_group_charge.*, cost_group.cost_group_desc, school.school_name  
FROM cost_group_charge  
LEFT JOIN cost_group ON (cost_group.cost_group_id=cost_group_charge.cost_group_id)  
LEFT JOIN school ON (school.school_id=cost_group_charge.rdcaccount_id)  
WHERE ( cost_group_charge.cost_group_id='SDA2' ) OR ( cost_group_charge.cost_group_id='SDA3' ) AND cost_group_charge.rdcaccount_id IN ('1', '7')    
ORDER BY cost_group_charge.age_group_id, cost_group_seq_nbr, cost_group_charge.banner_req  =>Count=6


This actually selects from other rdcaccount_id rows also. It needs the selections that are grouped with the OR statement to be bracketed together.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: isnull clause being filtered out of $where with scriptNext()
Next Topic: Recover Password is encrypted
Goto Forum:
  


Current Time: Tue Jul 23 01:22:57 EDT 2024

Total time taken to generate the page: 0.01235 seconds