I have a fields, that was created from from plain Sql string in MSSQL Dialect and that can't be feed to a parser due to a complex syntax. And i have a Plain sql string with query parts placeholders in PostgreSQL dialect, like so:
String myComplexSqlString = "({0} + sum({1}::integer)::text || {3}"
Is there any ways i can parse this SQL and insert all the query parts i need after the parsing step and render the whole field to MSSQL Dialect? Any suggestions?
That's not currently possible but it does sound interesting. I've created a feature request for this: https://github.com/jOOQ/jOOQ/issues/9447
For the time being, in your example, there's nothing preventing you from using jOOQ's API to construct this "complex SQL":
Field<String> complexSQL(Field<? extends Number> arg0, Field<?> arg1, Field<?> arg3) {
return cast(arg0.add(sum(cast(arg1, INTEGER))), CLOB).concat(arg3);
}