I need to extraxt from a table of my db the records that satisfy a condition
on a field date.
I use this query string for the data set:
="SELECT Cliente, NrDocumento, DataDocumento, NrRegistrazione,
DataRegistrazione, TipoDocumento, Descrizione, DataScadenza, Importo,
ImportoIncassato FROM Partitario WHERE (Azienda = " & "'" &
Parameters!Azienda.Value & "') AND (Cliente = " & "'" &
Parameters!Cliente.Value & "') AND (Importo - ImportoIncassato > 0) AND
(DataScadenza<=" & Format(Globals!ExecutionTime,"d") & ")"
In my table Partitario exists a record with datascadenza < actual date
calculated by Globals!ExecutionTime: but this query doesn't extract nothing!
Is the syntax right?
How can I solve this issue?
Many thanksUse a datediff instead of a <= comparison.
Craig
"Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
news:E6FB900D-CE25-4688-A88F-9384592FBA3A@.microsoft.com...
>I need to extraxt from a table of my db the records that satisfy a
>condition
> on a field date.
> I use this query string for the data set:
> ="SELECT Cliente, NrDocumento, DataDocumento, NrRegistrazione,
> DataRegistrazione, TipoDocumento, Descrizione, DataScadenza, Importo,
> ImportoIncassato FROM Partitario WHERE (Azienda = " & "'" &
> Parameters!Azienda.Value & "') AND (Cliente = " & "'" &
> Parameters!Cliente.Value & "') AND (Importo - ImportoIncassato > 0) AND
> (DataScadenza<=" & Format(Globals!ExecutionTime,"d") & ")"
> In my table Partitario exists a record with datascadenza < actual date
> calculated by Globals!ExecutionTime: but this query doesn't extract
> nothing!
> Is the syntax right?
> How can I solve this issue?
> Many thanks|||Or use GETDATE() in SQL query string.
Many thanks
"Craig" wrote:
> Use a datediff instead of a <= comparison.
> Craig
> "Pasquale" <Pasquale@.discussions.microsoft.com> wrote in message
> news:E6FB900D-CE25-4688-A88F-9384592FBA3A@.microsoft.com...
> >I need to extraxt from a table of my db the records that satisfy a
> >condition
> > on a field date.
> > I use this query string for the data set:
> > ="SELECT Cliente, NrDocumento, DataDocumento, NrRegistrazione,
> > DataRegistrazione, TipoDocumento, Descrizione, DataScadenza, Importo,
> > ImportoIncassato FROM Partitario WHERE (Azienda = " & "'" &
> > Parameters!Azienda.Value & "') AND (Cliente = " & "'" &
> > Parameters!Cliente.Value & "') AND (Importo - ImportoIncassato > 0) AND
> > (DataScadenza<=" & Format(Globals!ExecutionTime,"d") & ")"
> >
> > In my table Partitario exists a record with datascadenza < actual date
> > calculated by Globals!ExecutionTime: but this query doesn't extract
> > nothing!
> > Is the syntax right?
> >
> > How can I solve this issue?
> >
> > Many thanks
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment