db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garret O'Kelly" <garretoke...@beaumont.ie>
Subject order by col1, col2 nulls first ??
Date Fri, 20 Jan 2006 12:30:26 GMT
I'd like to use Oracles "order by ... nulls first"
clause, but can't quite get it with Criteria. Any ideas?

What I want is
... order by col1, col2 asc nulls first


I've tried
criteria.addAscendingOrderByColumn(MyPeer.COL1);
criteria.addAscendingOrderByColumn("col2 nulls first");

but this gives:
... order by col1 asc, col2 nulls first asc
which is invalid for Oracle

I've also tried
criteria.addAscendingOrderByColumn(MyPeer.COL1);
criteria.getOrderByColumns.add("col2 nulls first asc");

but that also gives an exception

I'm using torque 3.0 btw

************************* D I S C L A I M E R *************************

The opinions, conclusions and other information expressed in the above message, or contained
within attachments to the above message, are not given or endorsed by Beaumont Hospital unless
otherwise indicated by an authorised representative independent of this message.

This e-mail message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they
are addressed. If you have received this e-mail in error please notify
the system manager.

This e-mail has been scanned for viruses.

****************************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message