I was going to look in to that, as a plan B! If I use a ReportQuery, can I still get OJB to return a collection of objects? (will it still iterate over the ResultSet and build my VOs, or will it just return a bunch of String[]?)
Thanks! -----Original Message----- From: Edson Carlos Ericksson Richter [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 11:49 AM To: OJB Users List Subject: Re: Is it possible to do a Distinct on just one Column? (non PK) AFAIK, you will need a ReportQuery. Richter McCaffrey, John G. wrote: >I need to do a query and retrive a filtered set of data. >Basically I have a composite primary key >item_code >Price_Area_code >price_bracket_cd >effect_date > >an item can be in multiple price_areas , and will have historical entries >over time. >to get the current row, I have to check effect_date > current date and >end_effect_date < current date > >what I need to do is get a list of item_codes in a given price_area, >regardless of how many brackets entries there are >select a distnct (item_code) where price_area = 1 and effect_date .... > >how can I tell ojb which column I want to make distinct? > > >Could I do a subselect? >select * from xx_table a where > item_code in(select (distinct) where price_area = 1 and >effect_date ....) > >thanks! > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
