return sum of two variables in astored proc

return sum of two variables in astored proc

Post by sing » Wed, 06 Jun 2001 02:25:58





WHERE  COL1 = 'W03'

WHERE COL2 = 'W33'


/*



 
 
 

return sum of two variables in astored proc

Post by Dinesh.T.K » Wed, 06 Jun 2001 03:49:06


Singh,

You came close :-)

Try this :



WHERE  COL1 = 'W03'

WHERE COL2 = 'W33'



Dinesh.

 
 
 

return sum of two variables in astored proc

Post by Kevi » Thu, 07 Jun 2001 05:52:50


or you could use "set"





WHERE  COL1 = 'W03'

WHERE COL2 = 'W33'


/*



 
 
 

1. Can a stored proc return two values?

I've got a select statement that I'm using to return two column values
from a join of two tables.  I'd like to put it into a stored
procedure, but I can't seem to make the syntax work to set and return
the two values.  I'm using SQL Server 7 with Delphi 5 Enterprise.

Here's the statement (:CircuitToFind is the parameter I pass in)

select c.connectionID, t.wo_id
from connections c join circuits t
on c.circuitid = t.circuitid where c.circuitID = :CircuitToFind

Is it even possible for a SP to return two values like this?
Thanks,
Myron

Arithmetic is being able to count up to twenty without taking off your
shoes.  -- Mickey Mouse

2. MSDE & SQL Server Developer Edition License

3. Variable from Access 2K form to an SP with two returns

4. TQuery SQL - Database, User, Password Logon

5. Same Proc to return Integer or String variable.

6. Seeking Programmer (Fxpro/C) for full-time position in NYC

7. Proc SP returning variable number of elements

8. Sybase Metaworks help needed

9. calling stored proc from stored proc via variable

10. Returning a value from a Stored Proc to a Stored Proc

11. newbie-- how to return proc values to another proc to be used in a cursor

12. How to return a recordset and some return values from stroed proc

13. Help : RETURN in trigger not returning to stored proc properly