My Code as below: - ID,CustomerName,Customernumber,Type,Model,Serialnumber,PhoneNumber,Email,Country,SOW,Qty,InstallationDate,WarrantyExpiryDate,StopdateinCalculation,productDescription,GrossMaintenanceprice,YearMonth,ServiceTierlevel,SLAlevel,Location,NrofDaysincontract,TotalGrossMaintenanceamount,Yearamount,Netamountperperiod)
-
-
-
@ID int,
-
@CustomerName nvarchar(255),
-
@Customernumber int,
-
@Type nvarchar(255),
-
@Model nvarchar(255),
-
@Serialnumber nvarchar(255),
-
@PhoneNumber nvarchar(255),
-
@Email nvarchar(255),
-
@Country nvarchar(255),
-
@SOW nvarchar(255),
-
@Qty int,
-
@InstallationDate datetime,
-
@WarrantyExpiryDate datetime,
-
@StartdateinCalculation datetime,
-
@StopdateinCalculation nvarchar(255),
-
@ProductDescription nvarchar(255),
-
@GrossMaintenanceprice money,
-
@YearMonth nvarchar(255),
-
@ServiceTierlevel nvarchar(255),
-
@SLALevel nvarchar(255),
-
@Location nvarchar(255),
-
@Nrofdaysincontract int,
-
@totalGrossMaintenanceamount money,
-
@Yearamount money,
-
@Netamountperperiod money,
-
-
AS
-
-
INSERT INTO Contracts (ID,CustomerName,Customernumber,Type,Model,Serialnumber,PhoneNumber,Email,Country,SOW,Qty,InstallationDate,WarrantyExpiryDate,StopdateinCalculation,ProductDescription,GrossMaintenanceprice,YearMonth,ServiceTierlevel,SLAlevel,Location,NrofDaysincontract,TotalGrossMaintenanceamount,Yearamount,Netamountperperiod)
-
Values(@ID,@CustomerName,@Customernumber,@Type,@Model,@Serialnumber,@PhoneNumber,@Email,@Country,@SOW,@Qty,@InstallationDate,@WarrantyExpiryDate,@StopdateinCalculation,@ProductDescription,@GrossMaintenanceprice,@YearMonth,@ServiceTierlevel,@SLAlevel,@Location,@NrofDaysincontract,@TotalGrossMaintenanceamount,@Yearamount,@Netamountperperiod)
-
-
RETURN
i cant find my syntax error 3 days searching any help will be appricated.
Thanx
Amr Ghoneem
2 1283 Luuk 1,047
Expert 1GB
maybe you should not put a comma here:
@Netamountperperiod money, - CREATE PROCEDURE [dbo].[spContracts]
-
@ID int = Null,
-
@CustomerName nvarchar(255) = Null,
-
@Customernumber int = Null,
-
@Type nvarchar(255) = Null,
-
@Model nvarchar(255) = Null,
-
@Serialnumber nvarchar(255) = Null,
-
@PhoneNumber nvarchar(255) = Null,
-
@Email nvarchar(255) = Null,
-
@Country nvarchar(255) = Null,
-
@SOW nvarchar(255) = Null,
-
@Qty int = Null,
-
@InstallationDate datetime = Null,
-
@WarrantyExpiryDate datetime = Null,
-
@StartdateinCalculation datetime = Null,
-
@StopdateinCalculation nvarchar(255) = Null,
-
@ProductDescription nvarchar(255) = Null,
-
@GrossMaintenanceprice money = Null,
-
@YearMonth nvarchar(255) = Null,
-
@ServiceTierlevel nvarchar(255) = Null,
-
@SLALevel nvarchar(255) = Null,
-
@Location nvarchar(255) = Null,
-
@Nrofdaysincontract int = Null,
-
@totalGrossMaintenanceamount money = Null,
-
@Yearamount money = Null,
-
@Netamountperperiod money = Null
-
-
AS
-
-
BEGIN
-
-
INSERT INTO Contracts (ID,CustomerName,Customernumber,Type,Model,Serialnumber,PhoneNumber,Email,Country,SOW,Qty,InstallationDate,WarrantyExpiryDate,StopdateinCalculation,ProductDescription,GrossMaintenanceprice,YearMonth,ServiceTierlevel,SLAlevel,Location,NrofDaysincontract,TotalGrossMaintenanceamount,Yearamount,Netamountperperiod)
-
Values(@ID,@CustomerName,@Customernumber,@Type,@Model,@Serialnumber,@PhoneNumber,@Email,@Country,@SOW,@Qty,@InstallationDate,@WarrantyExpiryDate,@StopdateinCalculation,@ProductDescription,@GrossMaintenanceprice,@YearMonth,@ServiceTierlevel,@SLAlevel,@Location,@NrofDaysincontract,@TotalGrossMaintenanceamount,@Yearamount,@Netamountperperiod)
-
-
END
-
-
EXECUTE [spContracts] @id =1, @Customername = 'Your Name'
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Filips Benoit |
last post by:
Hi,
Can I mix ADO-code (insert, update recordsets) and stored procedures in a
transaction?
Filip
|
by: Jenny C. |
last post by:
Hi
I am fairly new to .NET, and I am having a hard time to call a stored procedure from C# code in a windows application
I have tested my connection (and login) several time and it is OK. If I...
|
by: compuglobalhypermeganetz0r |
last post by:
I am having trouble getting an adapter to update my access database, it
gives the error Syntax error in INSERT INTO statement. for
Line 98: Adapter.Update(WineDS, "tblWines")
Below is my...
|
by: SandySears |
last post by:
I am trying to use a stored procedure to insert a record using VS 2005, VB
and SQL Server Express. The code runs without errors or exceptions, and
returns the new identifer in the output...
|
by: mahajanvit |
last post by:
Hi one and all
I got this problem during my project. So in order to solve this I made
a very small application. I am trying to insert using SP and
sqldatasource control. I know that while using...
|
by: soahil |
last post by:
hello
I am facing a problem.
i have two tables named "BILL_DETAIL" and "COMPANY"
both structure is as follws:
---------------------
"BILL_DETAIL"
---------------------
BILL_ID ...
|
by: prashanth023 |
last post by:
Hi ,
Can any body please solve the problem
I need a stored procedure that should take a number as input for number of records to insert.
And it should take the row by row data and insert n...
|
by: koyanpaing |
last post by:
Hi everyone,
I would like to know about how to insert data into existing table row.
here is my javascript file.
function addDataToRows(tableID,noOfRows,data) {
var table =...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |