Recordset in Stored Procedure

Results 1 to 2 of 2

Thread: Recordset in Stored Procedure

  1. #1
    Jgachihi Guest

    Default Recordset in Stored Procedure

    I am trying to get information from various tables to show on the same page. Is it possible to use recordsets to access that information from different tables and get it passed in a stored procedure? If so how?

  2. #2
    Garth Guest

    Default RE: Recordset in Stored Procedure

    I am not sure if this is what you are looking for, but the example shown below uses a stored procedure to get information from two tables (in the sample pubs database that comes with SQL Server) and then displays the first record returned.<BR><BR>Garth<BR><BR><BR>< BR>--*Stored Procedure<BR>CREATE PROCEDURE ps_SELECT<BR>AS<BR>SELECT RTRIM(fname)+&#039 &#039+lname AS "Name",<BR> job_desc <BR>FROM employee, jobs<BR>WHERE employee.job_id = jobs.job_id<BR><BR><BR>--*ASP<BR>&#060;!--#include file=""--&#062;<BR>&#060;%<BR> sSQL = "ps_SELECT"<BR> SET rs = SQLConn.Execute(sSQL)<BR> response.write rs("Name")+" -- "+rs("job_desc")<BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts