View Single Post
  #2 (permalink)  
Old March 25th, 2006, 05:26 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You need to decalre variables to receive the output and specify that they are of type OUTPUT:
Code:
DECLARE @CompanyName NVARCHAR(40) 
DECLARE @ContactName NVARCHAR(30)
DECLARE @ContactTitle NVARCHAR(30) 
EXEC procOutGetCustomer 'ALFKI', @CompanyName OUTPUT, @ContactName OUTPUT, @ContactTitle OUTPUT
PRINT 'CompanyName: ' + @CompanyName
PRINT 'ContactName: ' + @ContactName
PRINT 'ContactTitle: ' + @ContactTitle
--

Joe (Microsoft MVP - XML)
Reply With Quote