There are a few interesting things in software development that you’ll generally only learn about by working on “certain” types of applications. Take, for example, the HTTP 414 “Way Too F#%&ing Long” response: there’s no standardized upper limit and many web servers don’t even document how long GET requests may be.
While working with his company's service desk application, Ben noticed a similar type of error message come from SQL Server.
Incorrect syntax near '('. Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries.
It was Error 191 — another error with no (seemingly) documented upper limit — and was triggered by the following query.
SELECT DISTINCT COUNT(Task.RecId) FROM Task WHERE (Task.TaskType = @P514) AND (Task.Status = @P1) AND (Task.RecId is not null) AND (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( (((((((((((((((((((((((((((((((((((((((((((((((((((( ((((((((((((((((((((((((((((((((((((((((((( (Task.OwnerTeam = @P2) AND (Task.OwnerTeam = @P3)) AND (Task.OwnerTeam = @P4)) AND (Task.OwnerTeam = @P5)) AND (Task.OwnerTeam = @P6)) AND (Task.OwnerTeam = @P7)) AND (Task.OwnerTeam = @P8)) AND (Task.OwnerTeam = @P9)) AND (Task.OwnerTeam = @P10)) AND (Task.OwnerTeam = @P11)) AND (Task.OwnerTeam = @P12)) AND (Task.OwnerTeam = @P13)) AND (Task.OwnerTeam = @P14)) AND (Task.OwnerTeam = @P15)) AND (Task.OwnerTeam = @P16)) AND (Task.OwnerTeam = @P17)) AND (Task.OwnerTeam = @P18)) AND (Task.OwnerTeam = @P19)) AND (Task.OwnerTeam = @P20)) AND (Task.OwnerTeam = @P21)) AND (Task.OwnerTeam = @P22)) AND (Task.OwnerTeam = @P23)) AND (Task.OwnerTeam = @P24)) AND (Task.OwnerTeam = @P25)) AND (Task.OwnerTeam = @P26)) AND (Task.OwnerTeam = @P27)) AND (Task.OwnerTeam = @P28)) AND (Task.OwnerTeam = @P29)) AND (Task.OwnerTeam = @P30)) AND (Task.OwnerTeam = @P31)) AND (Task.OwnerTeam = @P32)) AND (Task.OwnerTeam = @P33)) AND (Task.OwnerTeam = @P34)) AND (Task.OwnerTeam = @P35)) AND (Task.OwnerTeam = @P36)) AND (Task.OwnerTeam = @P37)) AND (Task.OwnerTeam = @P38)) AND (Task.OwnerTeam = @P39)) AND (Task.OwnerTeam = @P40)) AND (Task.OwnerTeam = @P41)) AND (Task.OwnerTeam = @P42)) AND (Task.OwnerTeam = @P43)) AND (Task.OwnerTeam = @P44)) AND (Task.OwnerTeam = @P45)) AND (Task.OwnerTeam = @P46)) AND (Task.OwnerTeam = @P47)) AND (Task.OwnerTeam = @P48)) AND (Task.OwnerTeam = @P49)) AND (Task.OwnerTeam = @P50)) AND (Task.OwnerTeam = @P51)) AND (Task.OwnerTeam = @P52)) AND (Task.OwnerTeam = @P53)) AND (Task.OwnerTeam = @P54)) AND (Task.OwnerTeam = @P55)) AND (Task.OwnerTeam = @P56)) AND (Task.OwnerTeam = @P57)) AND (Task.OwnerTeam = @P58)) AND (Task.OwnerTeam = @P59)) AND (Task.OwnerTeam = @P60)) AND (Task.OwnerTeam = @P61)) AND (Task.OwnerTeam = @P62)) AND (Task.OwnerTeam = @P63)) AND (Task.OwnerTeam = @P64)) AND (Task.OwnerTeam = @P65)) AND (Task.OwnerTeam = @P66)) AND (Task.OwnerTeam = @P67)) AND (Task.OwnerTeam = @P68)) AND (Task.OwnerTeam = @P69)) AND (Task.OwnerTeam = @P70)) AND (Task.OwnerTeam = @P71)) AND (Task.OwnerTeam = @P72)) AND (Task.OwnerTeam = @P73)) AND (Task.OwnerTeam = @P74)) AND (Task.OwnerTeam = @P75)) AND (Task.OwnerTeam = @P76)) AND (Task.OwnerTeam = @P77)) AND (Task.OwnerTeam = @P78)) AND (Task.OwnerTeam = @P79)) AND (Task.OwnerTeam = @P80)) AND (Task.OwnerTeam = @P81)) AND (Task.OwnerTeam = @P82)) AND (Task.OwnerTeam = @P83)) AND (Task.OwnerTeam = @P84)) AND (Task.OwnerTeam = @P85)) AND (Task.OwnerTeam = @P86)) AND (Task.OwnerTeam = @P87)) AND (Task.OwnerTeam = @P88)) AND (Task.OwnerTeam = @P89)) AND (Task.OwnerTeam = @P90)) AND (Task.OwnerTeam = @P91)) AND (Task.OwnerTeam = @P92)) AND (Task.OwnerTeam = @P93)) AND (Task.OwnerTeam = @P94)) AND (Task.OwnerTeam = @P95)) AND (Task.OwnerTeam = @P96)) AND (Task.OwnerTeam = @P97)) AND (Task.OwnerTeam = @P98)) AND (Task.OwnerTeam = @P99)) AND (Task.OwnerTeam = @P100)) AND (Task.OwnerTeam = @P101)) AND (Task.OwnerTeam = @P102)) AND (Task.OwnerTeam = @P103)) AND (Task.OwnerTeam = @P104)) AND (Task.OwnerTeam = @P105)) AND (Task.OwnerTeam = @P106)) AND (Task.OwnerTeam = @P107)) AND (Task.OwnerTeam = @P108)) AND (Task.OwnerTeam = @P109)) AND (Task.OwnerTeam = @P110)) AND (Task.OwnerTeam = @P111)) AND (Task.OwnerTeam = @P112)) AND (Task.OwnerTeam = @P113)) AND (Task.OwnerTeam = @P114)) AND (Task.OwnerTeam = @P115)) AND (Task.OwnerTeam = @P116)) AND (Task.OwnerTeam = @P117)) AND (Task.OwnerTeam = @P118)) AND (Task.OwnerTeam = @P119)) AND (Task.OwnerTeam = @P120)) AND (Task.OwnerTeam = @P121)) AND (Task.OwnerTeam = @P122)) AND (Task.OwnerTeam = @P123)) AND (Task.OwnerTeam = @P124)) AND (Task.OwnerTeam = @P125)) AND (Task.OwnerTeam = @P126)) AND (Task.OwnerTeam = @P127)) AND (Task.OwnerTeam = @P128)) AND (Task.OwnerTeam = @P129)) AND (Task.OwnerTeam = @P130)) AND (Task.OwnerTeam = @P131)) AND (Task.OwnerTeam = @P132)) AND (Task.OwnerTeam = @P133)) AND (Task.OwnerTeam = @P134)) AND (Task.OwnerTeam = @P135)) AND (Task.OwnerTeam = @P136)) AND (Task.OwnerTeam = @P137)) AND (Task.OwnerTeam = @P138)) AND (Task.OwnerTeam = @P139)) AND (Task.OwnerTeam = @P140)) AND (Task.OwnerTeam = @P141)) AND (Task.OwnerTeam = @P142)) AND (Task.OwnerTeam = @P143)) AND (Task.OwnerTeam = @P144)) AND (Task.OwnerTeam = @P145)) AND (Task.OwnerTeam = @P146)) AND (Task.OwnerTeam = @P147)) AND (Task.OwnerTeam = @P148)) AND (Task.OwnerTeam = @P149)) AND (Task.OwnerTeam = @P150)) AND (Task.OwnerTeam = @P151)) AND (Task.OwnerTeam = @P152)) AND (Task.OwnerTeam = @P153)) AND (Task.OwnerTeam = @P154)) AND (Task.OwnerTeam = @P155)) AND (Task.OwnerTeam = @P156)) AND (Task.OwnerTeam = @P157)) AND (Task.OwnerTeam = @P158)) AND (Task.OwnerTeam = @P159)) AND (Task.OwnerTeam = @P160)) AND (Task.OwnerTeam = @P161)) AND (Task.OwnerTeam = @P162)) AND (Task.OwnerTeam = @P163)) AND (Task.OwnerTeam = @P164)) AND (Task.OwnerTeam = @P165)) AND (Task.OwnerTeam = @P166)) AND (Task.OwnerTeam = @P167)) AND (Task.OwnerTeam = @P168)) AND (Task.OwnerTeam = @P169)) AND (Task.OwnerTeam = @P170)) AND (Task.OwnerTeam = @P171)) AND (Task.OwnerTeam = @P172)) AND (Task.OwnerTeam = @P173)) AND (Task.OwnerTeam = @P174)) AND (Task.OwnerTeam = @P175)) AND (Task.OwnerTeam = @P176)) AND (Task.OwnerTeam = @P177)) AND (Task.OwnerTeam = @P178)) AND (Task.OwnerTeam = @P179)) AND (Task.OwnerTeam = @P180)) AND (Task.OwnerTeam = @P181)) AND (Task.OwnerTeam = @P182)) AND (Task.OwnerTeam = @P183)) AND (Task.OwnerTeam = @P184)) AND (Task.OwnerTeam = @P185)) AND (Task.OwnerTeam = @P186)) AND (Task.OwnerTeam = @P187)) AND (Task.OwnerTeam = @P188)) AND (Task.OwnerTeam = @P189)) AND (Task.OwnerTeam = @P190)) AND (Task.OwnerTeam = @P191)) AND (Task.OwnerTeam = @P192)) AND (Task.OwnerTeam = @P193)) AND (Task.OwnerTeam = @P194)) AND (Task.OwnerTeam = @P195)) AND (Task.OwnerTeam = @P196)) AND (Task.OwnerTeam = @P197)) AND (Task.OwnerTeam = @P198)) AND (Task.OwnerTeam = @P199)) AND (Task.OwnerTeam = @P200)) AND (Task.OwnerTeam = @P201)) AND (Task.OwnerTeam = @P202)) AND (Task.OwnerTeam = @P203)) AND (Task.OwnerTeam = @P204)) AND (Task.OwnerTeam = @P205)) AND (Task.OwnerTeam = @P206)) AND (Task.OwnerTeam = @P207)) AND (Task.OwnerTeam = @P208)) AND (Task.OwnerTeam = @P209)) AND (Task.OwnerTeam = @P210)) AND (Task.OwnerTeam = @P211)) AND (Task.OwnerTeam = @P212)) AND (Task.OwnerTeam = @P213)) AND (Task.OwnerTeam = @P214)) AND (Task.OwnerTeam = @P215)) AND (Task.OwnerTeam = @P216)) AND (Task.OwnerTeam = @P217)) AND (Task.OwnerTeam = @P218)) AND (Task.OwnerTeam = @P219)) AND (Task.OwnerTeam = @P220)) AND (Task.OwnerTeam = @P221)) AND (Task.OwnerTeam = @P222)) AND (Task.OwnerTeam = @P223)) AND (Task.OwnerTeam = @P224)) AND (Task.OwnerTeam = @P225)) AND (Task.OwnerTeam = @P226)) AND (Task.OwnerTeam = @P227)) AND (Task.OwnerTeam = @P228)) AND (Task.OwnerTeam = @P229)) AND (Task.OwnerTeam = @P230)) AND (Task.OwnerTeam = @P231)) AND (Task.OwnerTeam = @P232)) AND (Task.OwnerTeam = @P233)) AND (Task.OwnerTeam = @P234)) AND (Task.OwnerTeam = @P235)) AND (Task.OwnerTeam = @P236)) AND (Task.OwnerTeam = @P237)) AND (Task.OwnerTeam = @P238)) AND (Task.OwnerTeam = @P239)) AND (Task.OwnerTeam = @P240)) AND (Task.OwnerTeam = @P241)) AND (Task.OwnerTeam = @P242)) AND (Task.OwnerTeam = @P243)) AND (Task.OwnerTeam = @P244)) AND (Task.OwnerTeam = @P245)) AND (Task.OwnerTeam = @P246)) AND (Task.OwnerTeam = @P247)) AND (Task.OwnerTeam = @P248)) AND (Task.OwnerTeam = @P249)) AND (Task.OwnerTeam = @P250)) AND (Task.OwnerTeam = @P251)) AND (Task.OwnerTeam = @P252)) AND (Task.OwnerTeam = @P253)) AND (Task.OwnerTeam = @P254)) AND (Task.OwnerTeam = @P255)) AND (Task.OwnerTeam = @P256)) AND (Task.OwnerTeam = @P257)) AND (Task.OwnerTeam = @P258)) AND (Task.OwnerTeam = @P259)) AND (Task.OwnerTeam = @P260)) AND (Task.OwnerTeam = @P261)) AND (Task.OwnerTeam = @P262)) AND (Task.OwnerTeam = @P263)) AND (Task.OwnerTeam = @P264)) AND (Task.OwnerTeam = @P265)) AND (Task.OwnerTeam = @P266)) AND (Task.OwnerTeam = @P267)) AND (Task.OwnerTeam = @P268)) AND (Task.OwnerTeam = @P269)) AND (Task.OwnerTeam = @P270)) AND (Task.OwnerTeam = @P271)) AND (Task.OwnerTeam = @P272)) AND (Task.OwnerTeam = @P273)) AND (Task.OwnerTeam = @P274)) AND (Task.OwnerTeam = @P275)) AND (Task.OwnerTeam = @P276)) AND (Task.OwnerTeam = @P277)) AND (Task.OwnerTeam = @P278)) AND (Task.OwnerTeam = @P279)) AND (Task.OwnerTeam = @P280)) AND (Task.OwnerTeam = @P281)) AND (Task.OwnerTeam = @P282)) AND (Task.OwnerTeam = @P283)) AND (Task.OwnerTeam = @P284)) AND (Task.OwnerTeam = @P285)) AND (Task.OwnerTeam = @P286)) AND (Task.OwnerTeam = @P287)) AND (Task.OwnerTeam = @P288)) AND (Task.OwnerTeam = @P289)) AND (Task.OwnerTeam = @P290)) AND (Task.OwnerTeam = @P291)) AND (Task.OwnerTeam = @P292)) AND (Task.OwnerTeam = @P293)) AND (Task.OwnerTeam = @P294)) AND (Task.OwnerTeam = @P295)) AND (Task.OwnerTeam = @P296)) AND (Task.OwnerTeam = @P297)) AND (Task.OwnerTeam = @P298)) AND (Task.OwnerTeam = @P299)) AND (Task.OwnerTeam = @P300)) AND (Task.OwnerTeam = @P301)) AND (Task.OwnerTeam = @P302)) AND (Task.OwnerTeam = @P303)) AND (Task.OwnerTeam = @P304)) AND (Task.OwnerTeam = @P305)) AND (Task.OwnerTeam = @P306)) AND (Task.OwnerTeam = @P307)) AND (Task.OwnerTeam = @P308)) AND (Task.OwnerTeam = @P309)) AND (Task.OwnerTeam = @P310)) AND (Task.OwnerTeam = @P311)) AND (Task.OwnerTeam = @P312)) AND (Task.OwnerTeam = @P313)) AND (Task.OwnerTeam = @P314)) AND (Task.OwnerTeam = @P315)) AND (Task.OwnerTeam = @P316)) AND (Task.OwnerTeam = @P317)) AND (Task.OwnerTeam = @P318)) AND (Task.OwnerTeam = @P319)) AND (Task.OwnerTeam = @P320)) AND (Task.OwnerTeam = @P321)) AND (Task.OwnerTeam = @P322)) AND (Task.OwnerTeam = @P323)) AND (Task.OwnerTeam = @P324)) AND (Task.OwnerTeam = @P325)) AND (Task.OwnerTeam = @P326)) AND (Task.OwnerTeam = @P327)) AND (Task.OwnerTeam = @P328)) AND (Task.OwnerTeam = @P329)) AND (Task.OwnerTeam = @P330)) AND (Task.OwnerTeam = @P331)) AND (Task.OwnerTeam = @P332)) AND (Task.OwnerTeam = @P333)) AND (Task.OwnerTeam = @P334)) AND (Task.OwnerTeam = @P335)) AND (Task.OwnerTeam = @P336)) AND (Task.OwnerTeam = @P337)) AND (Task.OwnerTeam = @P338)) AND (Task.OwnerTeam = @P339)) AND (Task.OwnerTeam = @P340)) AND (Task.OwnerTeam = @P341)) AND (Task.OwnerTeam = @P342)) AND (Task.OwnerTeam = @P343)) AND (Task.OwnerTeam = @P344)) AND (Task.OwnerTeam = @P345)) AND (Task.OwnerTeam = @P346)) AND (Task.OwnerTeam = @P347)) AND (Task.OwnerTeam = @P348)) AND (Task.OwnerTeam = @P349)) AND (Task.OwnerTeam = @P350)) AND (Task.OwnerTeam = @P351)) AND (Task.OwnerTeam = @P352)) AND (Task.OwnerTeam = @P353)) AND (Task.OwnerTeam = @P354)) AND (Task.OwnerTeam = @P355)) AND (Task.OwnerTeam = @P356)) AND (Task.OwnerTeam = @P357)) AND (Task.OwnerTeam = @P358)) AND (Task.OwnerTeam = @P359)) AND (Task.OwnerTeam = @P360)) AND (Task.OwnerTeam = @P361)) AND (Task.OwnerTeam = @P362)) AND (Task.OwnerTeam = @P363)) AND (Task.OwnerTeam = @P364)) AND (Task.OwnerTeam = @P365)) AND (Task.OwnerTeam = @P366)) AND (Task.OwnerTeam = @P367)) AND (Task.OwnerTeam = @P368)) AND (Task.OwnerTeam = @P369)) AND (Task.OwnerTeam = @P370)) AND (Task.OwnerTeam = @P371)) AND (Task.OwnerTeam = @P372)) AND (Task.OwnerTeam = @P373)) AND (Task.OwnerTeam = @P374)) AND (Task.OwnerTeam = @P375)) AND (Task.OwnerTeam = @P376)) AND (Task.OwnerTeam = @P377)) AND (Task.OwnerTeam = @P378)) AND (Task.OwnerTeam = @P379)) AND (Task.OwnerTeam = @P380)) AND (Task.OwnerTeam = @P381)) AND (Task.OwnerTeam = @P382)) AND (Task.OwnerTeam = @P383)) AND (Task.OwnerTeam = @P384)) AND (Task.OwnerTeam = @P385)) AND (Task.OwnerTeam = @P386)) AND (Task.OwnerTeam = @P387)) AND (Task.OwnerTeam = @P388)) AND (Task.OwnerTeam = @P389)) AND (Task.OwnerTeam = @P390)) AND (Task.OwnerTeam = @P391)) AND (Task.OwnerTeam = @P392)) AND (Task.OwnerTeam = @P393)) AND (Task.OwnerTeam = @P394)) AND (Task.OwnerTeam = @P395)) AND (Task.OwnerTeam = @P396)) AND (Task.OwnerTeam = @P397)) AND (Task.OwnerTeam = @P398)) AND (Task.OwnerTeam = @P399)) AND (Task.OwnerTeam = @P400)) AND (Task.OwnerTeam = @P401)) AND (Task.OwnerTeam = @P402)) AND (Task.OwnerTeam = @P403)) AND (Task.OwnerTeam = @P404)) AND (Task.OwnerTeam = @P405)) AND (Task.OwnerTeam = @P406)) AND (Task.OwnerTeam = @P407)) AND (Task.OwnerTeam = @P408)) AND (Task.OwnerTeam = @P409)) AND (Task.OwnerTeam = @P410)) AND (Task.OwnerTeam = @P411)) AND (Task.OwnerTeam = @P412)) AND (Task.OwnerTeam = @P413)) AND (Task.OwnerTeam = @P414)) AND (Task.OwnerTeam = @P415)) AND (Task.OwnerTeam = @P416)) AND (Task.OwnerTeam = @P417)) AND (Task.OwnerTeam = @P418)) AND (Task.OwnerTeam = @P419)) AND (Task.OwnerTeam = @P420)) AND (Task.OwnerTeam = @P421)) AND (Task.OwnerTeam = @P422)) AND (Task.OwnerTeam = @P423)) AND (Task.OwnerTeam = @P424)) AND (Task.OwnerTeam = @P425)) AND (Task.OwnerTeam = @P426)) AND (Task.OwnerTeam = @P427)) AND (Task.OwnerTeam = @P428)) AND (Task.OwnerTeam = @P429)) AND (Task.OwnerTeam = @P430)) AND (Task.OwnerTeam = @P431)) AND (Task.OwnerTeam = @P432)) AND (Task.OwnerTeam = @P433)) AND (Task.OwnerTeam = @P434)) AND (Task.OwnerTeam = @P435)) AND (Task.OwnerTeam = @P436)) AND (Task.OwnerTeam = @P437)) AND (Task.OwnerTeam = @P438)) AND (Task.OwnerTeam = @P439)) AND (Task.OwnerTeam = @P440)) AND (Task.OwnerTeam = @P441)) AND (Task.OwnerTeam = @P442)) AND (Task.OwnerTeam = @P443)) AND (Task.OwnerTeam = @P444)) AND (Task.OwnerTeam = @P445)) AND (Task.OwnerTeam = @P446)) AND (Task.OwnerTeam = @P447)) AND (Task.OwnerTeam = @P448)) AND (Task.OwnerTeam = @P449)) AND (Task.OwnerTeam = @P450)) AND (Task.OwnerTeam = @P451)) AND (Task.OwnerTeam = @P452)) AND (Task.OwnerTeam = @P453)) AND (Task.OwnerTeam = @P454)) AND (Task.OwnerTeam = @P455)) AND (Task.OwnerTeam = @P456)) AND (Task.OwnerTeam = @P457)) AND (Task.OwnerTeam = @P458)) AND (Task.OwnerTeam = @P459)) AND (Task.OwnerTeam = @P460)) AND (Task.OwnerTeam = @P461)) AND (Task.OwnerTeam = @P462)) AND (Task.OwnerTeam = @P463)) AND (Task.OwnerTeam = @P464)) AND (Task.OwnerTeam = @P465)) AND (Task.OwnerTeam = @P466)) AND (Task.OwnerTeam = @P467)) AND (Task.OwnerTeam = @P468)) AND (Task.OwnerTeam = @P469)) AND (Task.OwnerTeam = @P470)) AND (Task.OwnerTeam = @P471)) AND (Task.OwnerTeam = @P472)) AND (Task.OwnerTeam = @P473)) AND (Task.OwnerTeam = @P474)) AND (Task.OwnerTeam = @P475)) AND (Task.OwnerTeam = @P476)) AND (Task.OwnerTeam = @P477)) AND (Task.OwnerTeam = @P478)) AND (Task.OwnerTeam = @P479)) AND (Task.OwnerTeam = @P480)) AND (Task.OwnerTeam = @P481)) AND (Task.OwnerTeam = @P482)) AND (Task.OwnerTeam = @P483)) AND (Task.OwnerTeam = @P484)) AND (Task.OwnerTeam = @P485)) AND (Task.OwnerTeam = @P486)) AND (Task.OwnerTeam = @P487)) AND (Task.OwnerTeam = @P488)) AND (Task.OwnerTeam = @P489)) AND (Task.OwnerTeam = @P490)) AND (Task.OwnerTeam = @P491)) AND (Task.OwnerTeam = @P492)) AND (Task.OwnerTeam = @P493)) AND (Task.OwnerTeam = @P494)) AND (Task.OwnerTeam = @P495)) AND (Task.OwnerTeam = @P496)) AND (Task.OwnerTeam = @P497)) AND (Task.OwnerTeam = @P498)) AND (Task.OwnerTeam = @P499)) AND (Task.OwnerTeam = @P500)) AND (Task.OwnerTeam = @P501)) AND (Task.OwnerTeam = @P502)) AND (Task.OwnerTeam = @P503)) AND (Task.OwnerTeam = @P504)) AND (Task.OwnerTeam = @P505)) AND (Task.OwnerTeam = @P506)) AND (Task.OwnerTeam = @P507)) AND (Task.OwnerTeam = @P508)) AND (Task.OwnerTeam = @P509)) AND (Task.OwnerTeam = @P510)) AND (Task.OwnerTeam = @P511)) AND (Task.OwnerTeam = @P512)) AND (Task.OwnerTeam = @P513)))
And I’d have to agree. That is nested way too f#%&ing deeply.