jwcolby
jwcolby at colbyconsulting.com
Wed Mar 26 15:35:56 CDT 2008
Thanks. I was reading it already. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Paul Nielsen Sent: Tuesday, March 25, 2008 12:01 PM To: 'Discussion concerning MS SQL Server' Subject: Re: [dba-SQLServer] Returning a dataset Hi John, Here's a chapter on sprocs. It's not the greatest chapter, but the section on return data scope is useful. -Paul -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Monday, March 24, 2008 4:17 PM To: 'Discussion concerning MS SQL Server' Subject: [dba-SQLServer] Returning a dataset A stored procedure can return a data set correct? Is that data set updateable? I need to run a stored procedure, where I pass in the Value for the TOP N (the N part) and then build up a SQL statement and execute that inside of the sp. That sp needs to return the data set to another SP, and that SP has to update a field in the data set returned by the first sp. Is this possible? ATM I have a view called TopN, which returns a date field. I have a query that updates that date field to today's date. The problem is that the TopN view is hard coded with a number (30000 for today's order) but that value could be any number. So I need to turn the view into a SP where I can pass in the number of records to update and then pass the set up date fields back to an update SP to do the update. John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com __________ NOD32 2968 (20080324) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com