-
Notifications
You must be signed in to change notification settings - Fork 39
rdbmsSpecifics is not extendable (custom) #32
Comments
Sorry, I don't fallow, Do you want a format a date that was print with a query? or a date inside a query? a use this file to change the output:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="OFF">
<appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} %level - %m%ex%n" />
</Console>
</appenders>
<loggers>
<root level="off">
<appender-ref ref="Console" />
</root>
<logger name="log4jdbc.log4j2" level="info" additivity="true">
<MarkerFilter marker="LOG4JDBC_NON_STATEMENT" onMatch="DENY" onMismatch="NEUTRAL"/>
</logger>
</loggers>
</configuration> The output 13:50:34.588 INFO - 5. SELECT @@VERSION; {executed in 86 ms}
13:50:35.058 INFO - 5. SELECT @@VERSION; {executed in 78 ms}
13:50:36.803 INFO - 5. SELECT P.CD_PARAMETRO...; {executed in 43 ms}
13:50:37.745 INFO - 5. SELECT U.CD_FUNCIONAR...; {executed in 69 ms}
13:50:37.961 INFO - 5. SELECT F.CD_CD_FUNCIO...; {executed in 50 ms}
... If it is not what you want, please describe what you expected |
I want to be able to customise how the date format comes inside the query i.e.
Currently it uses a format MM/dd/YYYY, which cannot be changed. |
Example: These two queries are the same,
SELECT
*
FROM (SELECT
U.CD_FUNCIONARIO,
U.CD_ORGAO,
MAX(U.DT_BLOQUEIO) AS DT_BLOQUEIO,
MAX(U.CD_SISTEMA) AS CD_SISTEMA,
MAX(U.DT_BLOQUEIO_SISTEMA) AS DT_BLOQUEIO_SISTEMA,
MAX(U.CD_PERFIL) AS CD_PERFIL,
MAX(U.DT_BLOQUEIO_PERFIL) AS DT_BLOQUEIO_PERFIL,
MAX(U.NM_FUNCIONARIO) AS NM_FUNCIONARIO,
MAX(U.CD_UG) AS CD_UG
FROM SG_V_USUARIO_CONSULTA U
WHERE (U.DT_BLOQUEIO >= TO_DATE('2017-04-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND
U.DT_BLOQUEIO <= TO_DATE('2017-04-25 23:59:59', 'yyyy-mm-dd hh24:mi:ss'))
GROUP BY U.CD_FUNCIONARIO, U.CD_ORGAO
ORDER BY 2 ASC, 8 ASC)
WHERE ROWNUM < 501;
SELECT TOP 500
U.CD_FUNCIONARIO,
U.CD_ORGAO,
MAX(U.DT_BLOQUEIO) AS DT_BLOQUEIO,
MAX(U.CD_SISTEMA) AS CD_SISTEMA,
MAX(U.DT_BLOQUEIO_SISTEMA) AS DT_BLOQUEIO_SISTEMA,
MAX(U.CD_PERFIL) AS CD_PERFIL,
MAX(U.DT_BLOQUEIO_PERFIL) AS DT_BLOQUEIO_PERFIL,
MAX(U.NM_FUNCIONARIO) AS NM_FUNCIONARIO,
MAX(U.CD_UG) AS CD_UG
FROM SG_V_USUARIO_CONSULTA U
WHERE (U.DT_BLOQUEIO >= CONVERT(DATETIME, '2017-04-01 00:00:00', 120) AND
U.DT_BLOQUEIO <= CONVERT(DATETIME, '2017-04-25 23:59:59', 120)) |
Brunorozendo, I was only using that as an example, we're using a less known database called Ingres owned by Actian. Here is an email of a sql statement produced by the logger
Correct format for us would be (Note: Yes we could also use Ingre's DATE() or ANSIDATE() functions. but the following is suitable for the database we are using)
|
Hi
it is possible at add external drivers that aren't "AutoLoadedPopularDrivers"
L185
It should be possible to add your own rdmsSpecifics
I need this because i would like to implement Australian Date formats for the sql generated (default is american MM/dd/yyyy).
The text was updated successfully, but these errors were encountered: