Tip #9 of my Writing Fast Queries blog post states: Avoid writing one query when it really should be two (or more) queries. It’s worth checking out that blog post in its entirety (as a refresher if you have already seen it). To briefly recap tip #9, ...
Markdown supported · ⌘↵ to post
Very helpful both for the code, and the perspective. Are there security concerns here from having a function that creates a query from inputs vs. a "hard coded" query?
Joe Kerr
Delivering real value with innovative strategies and solutions
I am trying to implement this with a more complicated query. Thoughts on a where clause like this, or one using between and dates? ( VW_Person.Person_Number = :APP_PERSON_PERSON Or :APP_IS_ADMIN = 'Y') And ( :P21_CRITERIA_STATUS = 'A' AND STATUS_TRAN_PERSON = 'ACTIVE' OR :P21_CRITERIA_STATUS = 'I' AND STATUS_TRAN_PERSON = 'INACTIVE' OR :P21_CRITERIA_STATUS NOT IN ('A', 'I')) And (:P21_CRITERIA_EPRGENRL_ID IS NULL OR Employer_ID = :P21_CRITERIA_Employer_ID); Note: Criteria_Status is a group letting the user select (A)ctive, (I)nactive, or Al(L) people. Thanks Joe