Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ALTER PROCEDURE dbo.select_data
	
AS

Declare @OutResult int

set @OutResult  ='50'

SELECT     [user_id], name1, address, mob, city, emailid
FROM         [user.] 

	RETURN


i have table : User
fields are:
Userid
name1
address
mob
city
emailid

i have taken gridview in which data is display according to this select query.
now i have to display OutResult with this exsisting data.OutResult is not in any table.

How to do this?
Posted
Updated 20-Feb-13 8:06am
v2

use this to declare OutResult as this not in any table
Declare @OutResult int
set @OutResult='50';

but tell me where you have to store this value or just want to display this
 
Share this answer
 
Comments
Member 9511889 20-Feb-13 14:00pm    
i have to just display it in gridview.
you are right that i have to use Declare @OutResult int
hinaiqbal 12-Mar-15 14:42pm    
accept the solution if it is helpful to you
use this


SQL
ALTER PROCEDURE dbo.select_data

AS
Declare<pre lang="cs">@OutResult int
set @OutResult='50';
SELECT     [user_id],@OutResult as OutResult, name1, address, mob, city, emailid
FROM         [user.]



and where you are using your stored procedure using reader.HasRows retrive this and use this anywhere you want
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900