When I configure a SQLDataSource control I want the following where clause...
WHERE (RegionID = @.RegionID AND DistrictID IS NULL AND CampusID IS NULL) OR
(DistrictID = @.DistrictID AND CampusID IS NULL ) OR
(CampusID = @.CampusID AND UserRole = 'CampusAdmin') OR
(CampusID = @.CampusID)
but it gets reformated as...
WHERE (RegionID = 'Region10') AND (DistrictID IS NULL) AND (CampusID IS NULL) OR
(DistrictID = 2) AND (CampusID IS NULL) OR
(CampusID = '999999103') AND (UserRole = 'CampusAdmin') OR
(CampusID = '999999103')
I don't think these are functionaly equivelant, are they?
If not how do I stop the 'wizard' from reformatting the SQL where clause?
Thanks
Interestingly enough, both WHERE clauses are identical because the AND takes precedence over the OR operator.|||Yes, they are identical (Although I *HATE* that). Hey SQL Builder, leave my SQL alone, thank you!|||Thanks alot. That is what I was hoping. Anyway, I wish they would leave it alone too!
No comments:
Post a Comment