Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   SQL (https://www.clubdelphi.com/foros/forumdisplay.php?f=6)
-   -   Como se hace esto en Firebird (https://www.clubdelphi.com/foros/showthread.php?t=91815)

tulio 05-05-2017 15:31:36

Como se hace esto en Firebird
 
Buen dia Gente

En SQL Server hago este select y puedo agrupar por mes , quiero saber como se hace en firbird

Código SQL [-]
select Month(fecha) as Mes, Count(*) as cantidad from reclamos  where year(fecha)=:Anio group by month(fecha) order by month(fecha) asc

Gracias !!!!

movorack 05-05-2017 15:38:09

Hola,

Revisa la función Extract

Cita:

Empezado por firebirdsql.org
EXTRACT (<part> FROM <datetime>)

<part> ::= YEAR | MONTH | DAY | WEEKDAY | YEARDAY | HOUR | MINUTE | SECOND
<datetime> ::= An expression of type DATE, TIME or TIMESTAMP


tulio 05-05-2017 16:04:19

Muchas Graciasss

Solucionadoooooo


La franja horaria es GMT +2. Ahora son las 17:00:39.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi