asked on
INSERT INTO [Doctors]
([LastName]
,[FirstName]
,[FullName])
VALUES
(@FirstName
,@LastName
,(@LastName + ', ' + @FirstName))
ASKER
CREATE PROCEDURE usp_InsertNewDoctor(@FirstName nchar(30), @LastName nchar(30))
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
INSERT INTO [AdaptSurvey].[dbo].[Doctors]
([LastName]
,[FirstName]
,[FullName])
VALUES
(@FirstName
,@LastName
,(@LastName + ', ' + @FirstName))
GO
ASKER
Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.
TRUSTED BY
it could be that the value of the firstname or lastname has some special characters that breaks the SQL statement? are they properly validated before being passed into the SP?
Are you sure its this insert statement that throws the syntax error?