i'm affraid you cannot compare 2 different types. I think SQL ca'nt and else, it's not recommended.
If you have realised your query in SQL, compare it with the SQL query produced by your OQL query ( help with P6spy ) and you will find what goes wrong. Regards On 4/13/06, Helder Gaspar Rodrigues <[EMAIL PROTECTED]> wrote: > > i tinhk that i have understaood your point of view, but how can i > compare A with B if they are diferents object types? > > Thank you > Bruno CROS wrote: > > Take in consideration fields with null value. Test <> ou = cannot be > > correctly done with nulls. > > > > In this case you have to write : A isNull OR A<>B > > > > or A NotNULL AND A==B > > > > Hope this may help you. > > > > Regards. > > > > > > On 4/13/06, Helder Gaspar Rodrigues <[EMAIL PROTECTED]> wrote: > >> Hello everyone, i know that maybe this ml is not the appropriate local > >> to ask this, but im so desperated that i have to try. > >> > >> Im using OJB in a java project, and now i want to query the objects > >> using odmg OQL query. > >> > >> Imagine class A and B. A has a set of B objets assigned into the > >> variable bs. > >> > >> B object have a variable called date with type java.util.Date; > >> > >> I want to retrieve all objects A that not match with the variable date > >> in all objects B in the set bs. > >> > >> Example: > >> > >> String oqlQuery = "select a from " + A.class.getName(); > >> oqlQuery += " where name = $1 and bs.data <> $2"; > >> > >> > >> the problem is if there is any B in the bs that do not match the "<>" > >> the respective object A that contains that B object is putted in the > >> result. > >> > >> I dont want that, i want: If there is any B in the bs set that match > >> "<>" object A is not considerated. > >> > >> > >> Any tips? > >> > >> Thank you a lot for your attention! > >> > >> --------------------------------------------------------------------- > >> 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] > >
