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]
|