Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 CREATE PROCEDURE

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-10-20 : 07:59:11
elen writes "i want to create a SP with this
select A1,max(A2),max(A3)
from A
group by A1
and the SP will return the result
can i ?
need this a.s.s.p
thanks"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-10-20 : 08:01:03
Well, crap, this is gonna take a good bit of effort:

create procedure myProc as
select A1,max(A2),max(A3)
from A
group by A1


Whew! Man, good thing I looked that up in Books Online, I never would have figured it out.

This message was brought to you by the letter A, G, and sarcasm.
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2006-10-20 : 13:20:11
naughty, NAUGHTY Rob.

CREATE PROCEDURE dbo.myProc as .....


[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page
   

- Advertisement -