Think of this like a grid with filters, I filter first with column x, this gives me result 1. Then I filter result 1 using column y and so forth.
That makes it a cumulative filter.
Thanks for reply,
when I do that , that will always return nothing.
The filters are cumulative. Is filter 2 should query from what one had returned n so forth.
On Apr 16, 2013 1:59 PM, "Francis Njenga" <korefn@gmail.com> wrote:Gave the same answer there.oracle will optimize the query for you.SELECT a.*first simplify the query to something like this and then just replace using positions. The where clause implies filter and
FROM fmt_answers_75 a
INNER JOIN users u ON u.id = a.created_by
INNER JOIN persons p ON p.id = u.person_id
WHERE 1 AND a.deleted = 0 AND a.archived = 0
AND ( p.firstname LIKE '%Aden%' OR p.lastname LIKE '%Aden%' OR p.othernames LIKE '%Aden%' )
AND a2.date_created LIKE '%2013-03-27%'
AND a3.question_id = 17264 AND (a3.value = 'Saadhuumaay' OR a3.value = 'Surgudud' OR a3.value = 'Unaa' )
AND a.value = 'Male'
On Tue, Apr 16, 2013 at 1:05 PM, Ken Muturi <muturiken@gmail.com> wrote:
Guys who can help me solve this, Its been on stackoverflow for days without a comment
http://stackoverflow.com/questions/15948884/generate-sql-query-from-culmulative-filters-passed-in-from-the-post
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke
--
Kore Francis NjengaRunning and Walking are only breaths apart.
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke