-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Error if a null parameter is in my order by query
PostPosted: Wed May 26, 2004 12:59 pm 
Beginner
Beginner

Joined: Mon Sep 15, 2003 9:10 am
Posts: 43
Hi,

I like to know how can i do if a parameter is null in my "order by" query ?

My query is :

Code:
from OffreFret as o

where  (modele=0) and  (dateFinValidite is null or dateFinValidite>:dateFinValidite)  and (o.utilisateur.id=1)

order by o.paysEnlevement.libelle, o.departementEnlevement.libelle, o.regionEnlevement.libelle


My null parameter is the "o.departementEnlevement" object ?

It returns only rows where where departementEnlevement is not null.

Thanks again for your help !

Fabien.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 26, 2004 7:55 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
Does that work in SQL? (as opposed to Hibernate HQL)

_________________
Cheers,
Shorn.


Top
 Profile  
 
 Post subject: SQL HSQL....
PostPosted: Thu May 27, 2004 3:38 pm 
Beginner
Beginner

Joined: Mon Sep 15, 2003 9:10 am
Posts: 43
I don't know is there anyone know ?

Please help !

Fabien.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.