From 48070701476eabb4c425d984ec104d926bc44a38 Mon Sep 17 00:00:00 2001 From: rob bygrave Date: Fri, 11 Oct 2019 20:26:35 +1300 Subject: [PATCH] #1841 - SqlServer findCount with @Aggregation gives SQLException:No column name was specified for column 2 of 'c' --- .../org/tests/model/aggregation/TestAggregationTopLevel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/tests/model/aggregation/TestAggregationTopLevel.java b/src/test/java/org/tests/model/aggregation/TestAggregationTopLevel.java index bb43e192c..a244e4762 100644 --- a/src/test/java/org/tests/model/aggregation/TestAggregationTopLevel.java +++ b/src/test/java/org/tests/model/aggregation/TestAggregationTopLevel.java @@ -53,7 +53,7 @@ public class TestAggregationTopLevel extends BaseTestCase { assertThat(sql.get(0)).contains("select count(*) from ( select t0.date, sum(t0.total_kms) from d_machine_stats t0 group by t0.date having sum(t0.total_kms) > ?)"); assertThat(sql.get(1)).contains("select t0.date, sum(t0.total_kms) from d_machine_stats t0 group by t0.date having sum(t0.total_kms) > ? limit 10"); } else if (isSqlServer()) { - assertThat(sql.get(0)).contains("select count(*) from ( select t0.date c1, sum(t0.total_kms) c2 from d_machine_stats t0 group by t0.date having sum(t0.total_kms) > ?)"); + assertThat(sql.get(0)).contains("select count(*) from ( select t0.date c0, sum(t0.total_kms) c1 from d_machine_stats t0 group by t0.date having sum(t0.total_kms) > ?) as c"); } }