Hi guys, I'm trying to add a named constraint primary key into a large number of SQL Server tables joined in one reader with this code in the 'SQL to Run after Write' part:
FME_SQL_DELIMITER ;
ALTER TABLE @Value(fme_basename)
ADD CONSTRAINT PK_@Value(fme_basename) PRIMARY KEY (id1)
But I got this error:
Microsoft SQL Server Spatial Writer: Query failed, possibly due to a malformed statement. Query Text `ALTER TABLE @Value(fme_basename)
ADD CONSTRAINT PK_@Value(fme_basename) PRIMARY KEY (Id1)'. Provider error `(-2147217900) Incorrect syntax near '@Value'.'
Does anyone know what is the error? Or how can add a Primary Key for a large number of tables joined in one reader?
Thanks a lot