>I'm having this error: function argument value, type, or count is invalid, when i'm trying to do this query:
>
>
select llamadas.numero as numero ,;
[snip]
> FULL JOIN helpdesk!usuarios_cia ON Llamadas.usuario = Usuarios_cia.codigo ;
> where Sys(11,Llamadas.fllamada) >= sys(11,m.ini) and;
> Sys(11,Llamadas.fllamada) <= Sys(11,m.fin) ;
>order by numero ;
>group by numero
>
>What's wrong with the query?
Are you sure m.ini and m.fin are dates, and not strings containing dates? Besides, you can compare dates directly, without comparing their Julian date numbers. The sys(11, dDate) function returns the Julian date as a string, but it doesn't matter, the string always contains seven digits for any valid date (between 0001-01-01 and 9999-12-31), but it's completely unnecessary.
Try this:
... where Llamadas.fllamada between m.ini and m.fin
If m.ini and m.fin are not the same type as Llamadas.fllamada, you should get a "datatype mismatch" error.