Hello,
I have one query, written MySQL language, and there qork perfectly. But I like to use the same query, in postgreSQL and there get 2 times syntax error, and I'm not fing the issue.
Here is my code:
UPDATE "T_Status_Furna ce" SET "Status_CG" = true WHERE EXISTS ( SELECT MAX(m2.t1 - m1.t1) as delta FROM "Table_1_Furnac e_1" AS m1
INNER JOIN "Table_1_Furnac e_1" AS m2 ON "m2.ID_TimeStam p_FK"
> m1."ID_TimeStam p_FK" AND (m2."ID_TimeSta mp_FK" -1) DIV(10) = ( m1."ID_TimeStam p_FK" - 1) DIV(10) GROUP BY (m1."ID_TimeSta mp_FK" - 1 )
DIV 10 HAVING MAX(m2.t1 - m1.t1)
>= 100);
I have one query, written MySQL language, and there qork perfectly. But I like to use the same query, in postgreSQL and there get 2 times syntax error, and I'm not fing the issue.
Here is my code:
UPDATE "T_Status_Furna ce" SET "Status_CG" = true WHERE EXISTS ( SELECT MAX(m2.t1 - m1.t1) as delta FROM "Table_1_Furnac e_1" AS m1
INNER JOIN "Table_1_Furnac e_1" AS m2 ON "m2.ID_TimeStam p_FK"
> m1."ID_TimeStam p_FK" AND (m2."ID_TimeSta mp_FK" -1) DIV(10) = ( m1."ID_TimeStam p_FK" - 1) DIV(10) GROUP BY (m1."ID_TimeSta mp_FK" - 1 )
DIV 10 HAVING MAX(m2.t1 - m1.t1)
>= 100);