Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Selection with nulls
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

30 Posts

Posted - 06/10/2007 :  07:22:51  Show Profile  Visit annamaria's Homepage  Reply with Quote

Edited by - annamaria on 12/26/2008 10:16:41

Flowing Fount of Yak Knowledge

7266 Posts

Posted - 06/10/2007 :  16:04:10  Show Profile  Reply with Quote
There are max and isnull function, check books online to see if useful.
Go to Top of Page

Premature Yak Congratulator

22864 Posts

Posted - 06/11/2007 :  08:29:56  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
Is there a command called 'MAX' or something like that?

Read about it in sql server help file
Also Learn SQL


Failing to plan is Planning to fail
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 12/27/2008 :  12:00:41  Show Profile  Reply with Quote
Originally posted by annamaria


why are you removing original questions. please refrain from doing that
Go to Top of Page

Yak Posting Veteran

60 Posts

Posted - 12/27/2008 :  18:06:26  Show Profile  Reply with Quote
Not sure if this is what your looking for, but here is an example. I'm pretty new to SQL, so I'm sure there is a better way.

select o_cust as 'Customer',
COUNT(o.ord_number) as 'Number Of Orders',
MAX(o.t_miles) as 'Total Miles'
from order as o
where o.printed is NULL
group by o.cust
order by o.cust
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000