File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
SQL quetsion - how to 'convert' null to zero? (if statement)
Joined: Sep 10, 2004
Oct 08, 2007 17:33:00
quick question: is there a possibility to return the value 0 and not NULL from the db?
Select empl_id, age from myTable
I would like to have:
thanks for any pointers
[ October 08, 2007: Message edited by: Peter Primrose ]
Joined: Oct 06, 2007
Oct 08, 2007 18:15:00
Select empl_id, COALESCE(age,0)
This will regardless RDBMS.
[ October 08, 2007: Message edited by: Paul Campbell ]
It is sorta covered in the
JavaRanch Style Guide
subject: SQL quetsion - how to 'convert' null to zero? (if statement)
unable to capture messages from java.util.logging
Problem with nullable enum fields + Hibernate 3
HashMap Constantly Overwriting
Values of Hash Map to be 2-dimensional array
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014