I found the problem.
SELECT ##TOPN## ##COLUMNS## FROM customtable_test WHERE (##WHERE##) ORDER BY ##ORDERBY##
Base on above syntax. Before the hotfix, my CMS version was 9.0.0. During that, ##WHERE##
macro i can put it anywhere on the query. But after the hotfix, version 9.0.44, ##WHERE##
macro can only exists after SQL WHERE
.
Example.
SELECT TOP 10 * FROM customtable_test t
INNER JOIN CMS_Document d on d.DocumentForeignKey = t.ItemID
WHERE d.DocumentPublishedFrom >= getdate() ##WHERE##
or
SELECT TOP 10 * FROM customtable_test t
INNER JOIN CMS_Document d on d.DocumentForeignKey = t.ItemID ##WHERE##
WHERE d.DocumentPublishedFrom >= getdate()
Before hotfix query above works. But after hotfix. The query can only works as below
SELECT TOP 10 * FROM customtable_test t
INNER JOIN CMS_Document d on d.DocumentForeignKey = t.ItemID
WHERE ##WHERE## and d.DocumentPublishedFrom >= getdate()
Same with ##ORDERBY##
macro. I only found ##COLUMN##
macro that can be put in anywhere.