forked from github/dataease
fix: sqlserver 表名包含特殊字符
This commit is contained in:
parent
584b8a1f43
commit
a92f3c75f8
@ -172,7 +172,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
@Override
|
||||
public String createQueryTableWithLimit(String table, List<DatasetTableField> fields, Integer limit, boolean isGroup, Datasource ds, List<ChartFieldCustomFilterDTO> fieldCustomFilter) {
|
||||
String schema = new Gson().fromJson(ds.getConfiguration(), JdbcConfiguration.class).getSchema();
|
||||
return String.format("SELECT top %s * from %s ", limit.toString(), schema + "." + table);
|
||||
return String.format("SELECT top %s * from %s ", limit.toString(), schema + "." + String.format(SqlServerSQLConstants.KEYWORD_TABLE, table));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user