SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Store procedure help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tsaliki
Starting Member

India
19 Posts

Posted - 10/05/2012 :  00:39:56  Show Profile  Reply with Quote
i have a table like below:

create table testjob

(

jobid int,
jobname varchar(100),
time float,
name varchar(50)
)

insert into testjob values ( 1001,'java work',4.5,'arjun')
insert into testjob values ( 1005,'sql work',10,'arjun')
insert into testjob values ( 1010,'.net work',7.5,'arjun')
insert into testjob values ( 1040,'java work',5.5,'ravi')
insert into testjob values ( 1023,'php work',2.5,'arjun')
insert into testjob values ( 1027,'.net work',3.5,'ravi')


i want a procedure so that my output is as below in the html format like below that is in sql

we will write select * from testjob but i want the output to be displayed in html using stored procedure or so


Name Jobname Time

arjun Javawork 4.5
arjun sql work 10
arjun .net work 7.5
ravi java work 5.5
arjun php work 2.5
ravi .net work 3.5

jackv
Flowing Fount of Yak Knowledge

United Kingdom
2075 Posts

Posted - 10/05/2012 :  01:34:15  Show Profile  Visit jackv's Homepage  Reply with Quote
CREATE PROCEDURE AS
select [name],jobname,time FROM testjob

This will create the store procedure. Pass the results into a recordset object at the application layer and format as required

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000