Welcome Guest, Not a member yet? Register   Sign In
CI Database Class Changing my Query!
#10

[eluser]whobutsb[/eluser]
This the final query with error message:

Code:
DateRange: Array ( [start] => 2009-02-01 12:00 AM [end] => 2009-02-28 11:59 PM )
StatusDescID: 1
Business Units Array: Array ( [0] => HEM [1] => BHR [2] => BSC [3] => BWR [4] => CHI [5] => CHS [6] => MOO [7] => NEG [8] => NHC [9] => NYC [10] => PAR [11] => SMO [12] => TRI [13] => WAT )
A Database Error Occurred

Error Number: 209

SELECT *, *, *, *, *, *, *, *, *, *, *, *, *, *, SUM(tblEventFinance.estimated_value) AS Value FROM tblEvent JOIN tblEventFinance ON tblEvent.eventID = tblEventFinance.eventID JOIN tblEventLocation ON tblEvent.eventID = tblEventLocation.eventID JOIN tblLocation ON tblEventLocation.locationID = tblLocation.locationID WHERE shortBU = 'HEM' AND shortBU = 'BHR' AND shortBU = 'BSC' AND shortBU = 'BWR' AND shortBU = 'CHI' AND shortBU = 'CHS' AND shortBU = 'MOO' AND shortBU = 'NEG' AND shortBU = 'NHC' AND shortBU = 'NYC' AND shortBU = 'PAR' AND shortBU = 'SMO' AND shortBU = 'TRI' AND shortBU = 'WAT' AND (tblEvent.eventstarttime BETWEEN CONVERT(DATETIME, '2009-02-01 12:00 AM', 102) AND CONVERT(DATETIME, '2009-02-28 11:59 PM', 102)) AND tblEventFinance.actualized_value = 0 AND tblEventFinance.actualized_value IS NULL AND (tblLocation.shortBU = 'HEM' OR tblLocation.shortBU = 'BHR' OR tblLocation.shortBU = 'BSC' OR tblLocation.shortBU = 'BWR' OR tblLocation.shortBU = 'CHI' OR tblLocation.shortBU = 'CHS' OR tblLocation.shortBU = 'MOO' OR tblLocation.shortBU = 'NEG' OR tblLocation.shortBU = 'NHC' OR tblLocation.shortBU = 'NYC' OR tblLocation.shortBU = 'PAR' OR tblLocation.shortBU = 'SMO' OR tblLocation.shortBU = 'TRI' OR tblLocation.shortBU = 'WAT') GROUP BY tblEvent.status

If there is only one variable changing why would it throw in all of the *, *, *,!!!! This is driving me bananas!!


Messages In This Thread
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 08:51 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 09:11 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 09:15 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 10:44 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 10:44 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 10:48 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 11:15 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 11:16 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 11:24 AM
CI Database Class Changing my Query! - by El Forum - 07-16-2009, 11:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB