sorting query results in J2EE 2003-09-24 - By Stan Ou
Back Hi all,
I have a sql query that joins 5 or 6 tables that returns 100 to 200 records. The result is wrapped in a VO and is rendered in a JSP by html table. the user can click one of the 4 column headings to sort the result. what is the best to achieve this ? thanks in advance.
I've seen it being done this way: In the stored procedure, put the query in a string, like this: (pseudo code) a.set @(protected) = "select blah blah ... order by " + @(protected) b. execute @(protected)
this is the low tech way but gets the job done. But I'd like to see a better way.
stan
__ ____ ____ ____ ____ ____ ______ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|