By Domenico Ciavarella,  Project Manager, Studio A&T, s.r.l., Monza, Milan, Italy

Download the script.

Code Summary
Query builder task for ArcGIS Server 9.2

Now you also can use this TaskResults with query builder:
http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/10/24/Displaying-task-results-in-a-table.aspx