I think UNION is not a problem, but using a SELECT in a FROM clause could be.

In any way, I've changed my code to expect more than one value when issuing max() in 
areas I have extents.

Thanks,

Edson Richter

  ----- Original Message ----- 
  From: Charles Anthony 
  To: 'OJB Users List' 
  Sent: Tuesday, September 09, 2003 12:51 PM
  Subject: RE: ReportQueryByCriteria and Extents problem


  Hi Edson,

  [snip]

  > When I execute this command, I'm expecting that OJB will issue
  >
  >select max(nu_ordem) from
  >   (select nu_ordem from tb_compttpessoa_taxa
  >     union
  >    select nu_ordem from tb_compttpessoa_percent
  >     union
  >    select nu_ordem from tb_compttpessoa_script )
  >
  >that works fine in SapDB. But OJB is issuing three queries...
  >
  > It's a bug, or a expected feature?

  Currently it's an expected feature; I don't think that UNION is an ANSI
  standard SQL feature, and I'm not sure that all database platforms support
  it.

  Having said that, I've just done quick google for :
  select union DB2
  select union SQL Server
  select union ORACLE
  select union MYSQL
  select union HSQLDB

  All of which return pages that look like Reference pages i.e. it appears all
  the main databases that OJB tries to support implement UNION.

  Maybe OJB should try and implement this somewhere... But OJB issuing three
  queries should not currently be considered a bug.

  Cheers,

  Charles.


  This email and any attachments are strictly confidential and are intended
  solely for the addressee. If you are not the intended recipient you must
  not disclose, forward, copy or take any action in reliance on this message
  or its attachments. If you have received this email in error please notify
  the sender as soon as possible and delete it from your computer systems.
  Any views or opinions presented are solely those of the author and do not
  necessarily reflect those of HPD Software Limited or its affiliates.

   At present the integrity of email across the internet cannot be guaranteed
  and messages sent via this medium are potentially at risk.  All liability
  is excluded to the extent permitted by law for any claims arising as a re-
  sult of the use of this medium to transmit information by or to 
  HPD Software Limited or its affiliates.



  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.515 / Virus Database: 313 - Release Date: 1/9/2003

Reply via email to