0

I'm trying to run a MERGE query against a Sql Server CE database but it's throwing the error :

There was an error parsing the query. ...

while the same query is working fine in Sql Server . is merge statement not supported in Sql Server CE at all ? if so , is there any equivalent statement for CE ?

MERGE [Books] as T 
USING(SELECT 1 S) as S 
ON T.Category ='Fiction' AND T.Lang='En'
WHEN MATCHED THEN
UPDATE SET Title=@Title
WHEN NOT MATCHED THEN 
INSERT (Id , Title , Lang , Category) VALUES (@Id , @Title , @Lang , @Category);
mohsen dorparasti
  • 7,342
  • 5
  • 38
  • 59

1 Answers1

1

No, MERGE is not supported in SQL Server Compact, you must use a combination of UPDATE and INSERT

ErikEJ
  • 38,654
  • 5
  • 69
  • 109