> I am using MS SQL Server and am using inner/outer 
> joins. The reason why I am looping through two resultsets 
> and not joining them, is: While I need one row for 
> each projectid from the first resultset, I need to get
> all the rows with the same project id from the second 
> resultset. When I do inner join, the resultset includes 
> the duplicate data.
> 
> Then instead of having multiple duplicate rows in the HTML 
> table, with the same info except for few columns for each 
> project x, having two resulset allows me to populate the 
> first row with the first resulset row and then I am adding 
> columns for the additional info for each projectid x from 
> the second resultset.

You'll probably get significantly better performance by simply joining the
two tables, then filtering the output appropriately. You'll get duplicate
data from your "master" table; simply add conditional logic within your
output to skip that data.

In ColdFusion, you could do this very easily with the GROUP attribute of
CFOUTPUT. I'm not sure if there's something analogous in JSP or the JRun tag
libraries. If there isn't, you simply have to write a couple of lines within
your <jrun:foreach ...> tags (or whatever alternative output mechanism
you're using).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to