Reply to output parameters from row with max id

Your name:

Reply:


Posted by mcolson on 07/31/07 21:45

I am trying to select multiple values from the row with the max id,
and output them within my stored procedure. How would I combine the
following two rows so that I only need to use "from mytable where
IDnum = (select (max(IDnum)) from mytable))" once. I have at least 8
other outputs I will be setting and would like this to work more
efficiently than setting each individually... if possible.

set @outmtd = (select outmtd from mytable where IDnum = (select
(max(IDnum)) from mytable))
set @outytd = (select outytd from mytable where IDnum = (select
(max(IDnum)) from mytable))

Thanks for any help you can give

Matt

[Back to original 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

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