Solved

Parameter in SQL Server Stored Procedure

Posted on 2008-06-26
3
206 Views
Last Modified: 2010-04-21
I have the following lines in a stored procedure:


GO
CREATE PROCEDURE [dbo].[spBct_PhnxMrtgee_DeleteEndorsement]
(@PolicyNumber varchar(20), @EndorsementIdentifier varchar(3), @SequenceNumber smallint  null, @PolicyDateTime datetime)
AS

I have a database field that is defined as smallint NULL in the database called SEQUENCE_NUMBER.

When I am creating the parameter above, you can see may attempt to define this.  I am getting errors.  Does anyone know the correct syntax for this?

THanks,

JD

0
Comment
Question by:jamesdean666
3 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 250 total points
ID: 21878130
try this:

CREATE PROCEDURE [dbo].[spBct_PhnxMrtgee_DeleteEndorsement]
(@PolicyNumber varchar(20), @EndorsementIdentifier varchar(3), @SequenceNumber smallint  = null, @PolicyDateTime datetime)
0
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 250 total points
ID: 21878131
CREATE PROCEDURE [dbo].[spBct_PhnxMrtgee_DeleteEndorsement]
(@PolicyNumber varchar(20), @EndorsementIdentifier varchar(3), @SequenceNumber smallint =  null, @PolicyDateTime datetime)
0
 

Author Closing Comment

by:jamesdean666
ID: 31471148
Thanks.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

14 Experts available now in Live!

Get 1:1 Help Now