Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Parameter in SQL Server Stored Procedure

Posted on 2008-06-26
3
Medium Priority
?
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 1000 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 1000 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

718 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