Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6050101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:39:04+00:00 2026-05-23T07:39:04+00:00

Have a question about stored procedure: How to retrieve the variable’s value from stored

  • 0

Have a question about stored procedure:
How to retrieve the variable’s value from stored procedure that is declared as an output variable.
Running procedure as :

EXEC pn_investment_type_eqt {args}

Here is stored procedure:

create proc pn_investment_type_eqt
(
 @product_type varchar(10),
 @country varchar(10),
 @fi_treatment varchar(1)= '',
 @investment_type varchar(10) output,
 @investment_description varchar(50) output
)
as
 set nocount on

if @country <> 'US'
   select @country = 'FOREIGN'

if ( @fi_treatment not in ('Y','N') )
   select @fi_treatment = 'N'

if not exists(select 1 from d_investment_type_eqt
              where product_type = @product_type and isNull(country,'') = isNull(@country,'') and fi_treatment = @fi_treatment and row_status='A' )
begin
  select @country = 'ANY'
end

if exists ( select 1 from d_investment_type_eqt
            where product_type = @product_type and isNull(country,'') = isNull(@country,'') and fi_treatment = @fi_treatment and row_status='A' )
begin
   select @investment_type= investment_type , @investment_description = description
   from d_investment_type_eqt
   where product_type = @product_type and isNull(country,'') = isNull(@country,'') and fi_treatment = @fi_treatment and row_status='A'

end
 else
   return (-1)

I need to get values of @investment_type & @investment_description.

I can’t change procedure.

I am using a custom implementation of jdbcTemplate of Spring 2.0 (sql, mapper, args)

DB is Sybase

How could I get results from this stored procedure ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:39:04+00:00Added an answer on May 23, 2026 at 7:39 am

    Take a look at this sybase-in-and-out-parameters post, it possibly helps you further.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A simple question about Stored Procedures. I have one stored procedure collecting a whole
I have a question about stored procedure sp_updatestats . My understanding is when upgrading
I have a question about the in parameter type of a stored procedure. Normally
I have a question about using streams in .NET to load files from disk.
I have a mssql stored procedure question for you experts: I have two tables
If I have a parametrized stored procedure which takes a varchar(10) value and converts
I have a question about a performance of stored procedures in the ADS. I
This is a question about some stored procedures running on MSSQL 8 (I think
I have a question about the basic wav file data chunk. I know that
i have a question about the reasonableness of using entity framework only with stored

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.