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

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

annamaria
Starting Member

Israel
30 Posts

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

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

rmiao
Flowing Fount of Yak Knowledge

USA
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

madhivanan
Premature Yak Congratulator

India
22744 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
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

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

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

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

review


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

rjackman1959
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  
 New 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.05 seconds. Powered By: Snitz Forums 2000