Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » SQL




 Page 1 of 1 [ 6 posts ] 



Author Message
 Post subject: findin the lowest value
 Post Posted: Thu Nov 19, 2009 6:55 am 
Offline

Joined: Sat Feb 21, 2009 1:04 pm
Posts: 47
hi,

plz i need a it urgent

I m havin 5 columns where i need the lowest value among them issue
is when there were NULL values i usd is null 2 make them as a '0' so
always i m gettin da '0' as the lowest values...

Code:
col1 col2 col3 col4 col5


1 2 3 null null expectd was the lowest =1 howevr i m gettin
'0'..... plz do solve this....


thank you


Top 
 Post subject: Re: findin the lowest value
 Post Posted: Thu Nov 19, 2009 6:55 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
In the isnull statement replace them wid da maximum value instead of the
'0'..something like '9999' r something.


Top 
 Post subject: Re: findin the lowest value
 Post Posted: Thu Nov 19, 2009 6:55 am 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
Post da code you used


Top 
 Post subject: Re: findin the lowest value
 Post Posted: Thu Nov 19, 2009 6:55 am 
Offline

Joined: Sat Feb 21, 2009 1:04 pm
Posts: 47
Thank u dat's workin


Top 
 Post subject: Re: findin the lowest value
 Post Posted: Thu Nov 19, 2009 6:56 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
select min(column) 4m table where column ws not null


Top 
 Post subject: Re: findin the lowest value
 Post Posted: Thu Nov 19, 2009 6:56 am 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
Did you see my first reply?


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 6 posts ] 




Board index » Server Side Development » SQL


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron