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
 SQL Server Development (2000)
 Converting ASP code into a stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-09 : 09:39:59
Blake writes "Currently I have an ASP page which queries a SQL Server 7.0 database of articles and displays the article title as well as an excerpt of the article's body. It then takes the first 40 characters of the title (field type is "varchar(255)") and, if the title is > 40 character, displays a ... at the end. It also takes the body of the page (field type is "text"), which is in simple HTML, strips off the HTML tags using some VBScript, and displays the first 255 characters of the results, also with a ... at the end.

I'd like to convert this into a stored procedure so that I can return the records formatted that way. I will be calling it from sp_makewebtask, so it needs to return the records similar to a standard query.

What I'd like to know is how do I write a stored procedure which can go through each record in the query and reformat the fields, then return the entire query from the stored procedure. Is this possible?"
   

- Advertisement -