g_foulks
asked on
get a binary value using tsql
I have a Sql 2005 database with a test table containing one record. four columns (3 char and 1 varbinary(max)
If I write a query like this I get the returned record
when I write a stored procedure to pass in the input and get the output of phrase_content all I get is a null value. What am I doing wrong? Why can't I get the value of phrase_content when using a stored procedure?
If I write a query like this I get the returned record
select phrase_content from phrase_index where
application ='cs' and
phrase_number = '1' and
language = 'eng' and
gender = 'female'
when I write a stored procedure to pass in the input and get the output of phrase_content all I get is a null value. What am I doing wrong? Why can't I get the value of phrase_content when using a stored procedure?
ALTER PROCEDURE [dbo].[get_PhraseContent]
-- Add the parameters for the stored procedure here
@application char,
@phrase_number char,
@language char,
@gender char,
@phrase_content binary OUTPUT
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT @phrase_content = phrase_content from phrase_index where
application = @application and
phrase_number = @phrase_number and
language = @language and
gender = @gender
END
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER