Possible Duplicate:
MySQL Orderby a number, Nulls last
I need to order results in the following way using MS SQL. It needs to order the results by name first alphabetically and then by image name thats not null. And all rows where image is null need to show last and all rows where the image is not null should go first ordered alphabetically by name.
I'm calling the MS Sql query from PHP and it looks similar to this
$sql = "SELECT * FROM products ORDER BY name AsC, image DESC";
Is this possible and how?