select count (distinct dt_venc) from parcelas
gives:
Syntax error: Stopped parse at distinct
Am I using the wrong syntax, or is this feature not implemented in HXTT DBF? If this is the case, do you plan to implement it? Thanks.
|
>select count (distinct dt_venc) from parcelas
Try
select distinct on (dt_venc) count(dt_venc) from parcelas
|
This does not work, it returns the same result as
select count(*) from parcelas
I had to use
select count(*) from (select distinct dt_venc from parcelas)
I'd really like to use the standard (and easier to read) form:
select count (distinct dt_venc) from parcelas
|
>select count(*) from (select distinct dt_venc from parcelas)
Now select distinct on (dt_venc) count(dt_venc) from parcelas will return your expectant result. You can download that supported package now.
>I'd really like to use the standard (and easier to read) form:
>select count (distinct dt_venc) from parcelas
Mysql is using your suggested syntax, and HXTT DBF is using a syntax like PostgreSQL.
|