CHI-LTD
asked on
SQL Script errors
Can anyone shed light on this?
6/9/2017 2:46:57 PM domain\Administrator ERROR: Error running SQL command ' IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MARKETI NG_CONTROL _JOBS]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1) BEGIN CREATE TABLE [dbo].[MARKETING_CONTROL_J OBS] ( JOB_ID int NOT NULL IDENTITY (1, 1), JOB_TYPE tinyint NOT NULL, JOB_STATE tinyint NOT NULL, SOURCE_ID uniqueidentifier NULL, STAGE_ID uniqueidentifier NULL, REFRESH_PARENTS bit NULL, REFRESH_SOURCES bit NULL, BLOCK_ACTIVITIES bit NULL, NEW_RECIPIENTS_ONLY bit NULL, START_DATE_TIME datetime NULL, CREATED_DATE_UTC datetime NOT NULL, UPDATED_DATE_UTC datetime NULL, PROCESS_START_UTC datetime NULL, PROCESS_END_UTC datetime NULL, [USER_ID] uniqueidentifier NOT NULL, RUN_ID uniqueidentifier NULL ) ON [PRIMARY]; ALTER TABLE [dbo].[MARKETING_CONTROL_J OBS] ADD CONSTRAINT PK_MARKETING_CONTROL_JOBS PRIMARY KEY CLUSTERED ( JOB_ID ) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]; CREATE INDEX [IX_MARKETING_CONTROL_JOBS __JOB_STAT E__INCL_FL T] ON [dbo].[MARKETING_CONTROL_J OBS]([JOB_ STATE]) INCLUDE ( [JOB_TYPE] ,[SOURCE_ID] ,[STAGE_ID] ,[REFRESH_PARENTS] ,[REFRESH_SOURCES] ,[BLOCK_ACTIVITIES] ,[NEW_RECIPIENTS_ONLY] ,[START_DATE_TIME] ,[PROCESS_START_UTC] ,[PROCESS_END_UTC] ,[USER_ID] ,[RUN_ID] ) WHERE [JOB_STATE] = 0; END;': Incorrect syntax near the keyword 'WHERE'.
6/9/2017 2:46:57 PM domain\Administrator ERROR: Incorrect syntax near the keyword 'WHERE'.. Source at application.LiveUpdate.Run SQL(String sSQL)
6/9/2017 2:46:57 PM domain\Administrator ERROR: Incorrect syntax near the keyword 'WHERE'.. Source at application.LiveUpdate.Run SQL(String sSQL)6/9/2017 2:46:57 PM domain\Administrator ERROR: Incorrect syntax near the keyword 'WHERE'.. Source at application.LiveUpdate.Ins tallFile(S tring sHotFixGuid, String sDestination, String sType, String sFileGuid, String sValue)
Thanks
6/9/2017 2:46:57 PM domain\Administrator ERROR: Error running SQL command ' IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MARKETI
6/9/2017 2:46:57 PM domain\Administrator ERROR: Incorrect syntax near the keyword 'WHERE'.. Source at application.LiveUpdate.Run
6/9/2017 2:46:57 PM domain\Administrator ERROR: Incorrect syntax near the keyword 'WHERE'.. Source at application.LiveUpdate.Run
Thanks
The SQL contains no error. Thus how is it executed? Against which SQL Server version?
ASKER
It looks like its trying at add a new table. its a downloaded file (unsure of type) and assuming its running SQL script. SQL 2005 standard.
That was the missing part. Filtered indices where introduced with SQL Server 2008.
Thus you need either to upgrade your SQL Server or ask the vendor of that script.
Thus you need either to upgrade your SQL Server or ask the vendor of that script.
ASKER
Thats what they are saying: upgrade.
ASKER
Thats what they are saying: upgrade.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. i had tried to copy and paste it into an sql script but failed miserably.
I'll try your out.
I agree, they will..
thanks
I'll try your out.
I agree, they will..
thanks