View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003660||SymmetricDS||Bug||public||2018-08-03 15:25||2018-10-03 10:27|
|Target Version||Fixed in Version|
|Summary||0003660: Initial Load with Order by in initial_load_select MSSQL|
|Description||sym_trigger_router table has initial_load_select = "1 = 1 order by t.CreationTime" which create query like below :- |
select count(*) from "board"."dbo"."currencies" t where 1=1 order by t.CreationTime;
It works with MySQL but not with MSSQL because MSSQL does not support order by with count(*).
MSSQL gives :-
Column "board.dbo.currencies.creationtime" is invalid in the ORDER BY clause because it is not contained in either an aggregate function or the GROUP BY clause.
its due to https://www.symmetricds.org/issues/view.php?id=3092.
as symmetricds 3.9 has removed sym_trigger_router.initial_load_batch_count.
Now what is workaround to ignore count(*) query for MSSQL for initial load?
|Steps To Reproduce||set initial_load_select = "1 = 1 order by <anycolumn>" in sym_trigger_router for mssql database.|
sorry, its not due to https://www.symmetricds.org/issues/view.php?id=3092. I have tried the same in 3.8, same issue there as well.
Problem is symmetricds drafting wrong query for MSSQL. in case of MSSQL there should be option to disable count(*) query if order by clause is used in initial_load_select.
||Q: Is there a particular reason you need the initial load select to order the columns when doing the load?|