January 18, 2011 at 12:06 pm
I have a below requirement where I need to get the best way to write a stored procedure:
I have a table where there are employees data with employee_id, age, Posted_user_id
I need to get the rownumbers (concatenated) of all the employees with age 45 posted by Posted_User_id.
Please help me in getting the same.
Regards,
Kalyan
January 18, 2011 at 12:47 pm
Heh... and what form of age discrimination will this be used for? 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
January 19, 2011 at 9:58 am
Are you really using SQL Server 7 or 2000?
I'd start with a simple query that returns the rows I want.
Select columns desired from table where age = 45 and posted_user_id = @posted_user_id
I'm not sure what you mean by row number because you haven't posted the table definiton, so I don't know if there is a column named rownumber or if you mean the primary key for each row.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply