You are here: Select Range « MsSQL Server « IT news, forums, messages
Select Range

Posted by wtfbrb on 10/13/06 19:46

I have a select that is grouped by building/bedrooms and I have a range
for the rent

Select Building,BR,drpBuilding.buildID,
'$' + Cast(Min(Rent/BR) as varchar(10)) + '-' + Cast(MAX(Rent/BR) as
varchar(10)) as 'PerPerson'

FROM Apt JOIN drpBuilding ON
Apt.buildID = drpBuilding.buildID
Group By Building,drpBuilding.buildID,BR

Now I want to only show a range if the rent varies, ie. I don't want to
show the range as being 510-510 I would then like just a single value
displayed. How can I do such a select?

Thanks in advance,
Mark Meadows

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация