Stored Procedure with Parameters

Posted on 2012-09-10
Last Modified: 2012-09-27
How would you execute a stored procedure with the following parameters to produce return a result sets.
The stored procedure is already in production, but whenever i tried to call it, it's says missing parameters and these are the
listed parameters in SQL.


@starting_kper (char(6), Input, No default)
@starting_date (smalldatetime, Input, No default)
@ending_kper (char(6), Input, No default)
@ending_date (smalldatetime, Input, No default)
Question by:Favorable
    LVL 65

    Expert Comment

    by:Jim Horn
    Please show us...
    The T-SQL you use to call the stored proc, with values as parameters
    The CREATE PROC line in your SP that shows the parameters it accepts.
    LVL 25

    Accepted Solution

    exec storedprocedureName @starting_kper = 'value',@starting_date = 'datevalue', @ending_kper = 'value', @ending_date = 'datevalue'

    Author Closing Comment

    Thank it worked

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now