Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Sql Server Programming

Select statement


Hello everyone.

I'm having trouble with this select statement I need help with.

sample table:

date1      order_no    p_amt
8/11/06   123           800
3/27/07   123           800
3/28/06   123           800
9/11/07   123           0

I want the output of min date with p_amt <=0.
When a select statement I get the output of 3/27/07, it ignores the p_amt
column . any suggestions.

thanks in advance.

On Jun 6, 12:39 pm, ITDUDE27 <ITDUD@discussions.microsoft.com>
wrote:

You want the minimum value of date1 from those rows where p_amt is
less than or equal to zero.

SELECT min(date1) FROM tbl WHERE p_amt <= 0

See? It almost writes itself.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc