You are here: problem with Select query « MsSQL Server « IT news, forums, messages
problem with Select query

Posted by Sandy on 10/08/99 11:32

Hi,

I have a table A (ID, time,...)

first I want to select rows with max value of time. Then from these rows I
want the row with max ID value.
i am doing the following but its giving me the error mentioned below

select max(ID) from (select * from A where time in ( select max(time) from
A ) )
ERROR: Incorrect syntax near ')'

Where is the problem in my Query. Is there any other way to do this??

any help is greatly appreciated.

Thanks

 

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

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