Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Hi all:
i am trying to extract data from 2 tables (master and transaction) and store the resultant data in a temporary table in the form of a summary. For example,
Item Nmbr
AAA 10
BBB 7
CCC 12
and so on....
The SQL i am using is as below -
Select Master.PriName as Name, Count(*) as Total ;
From Tran, Master ;
Into Cursor C_GraphData ;
Where Tran.PriCode = Master.PriCode ;
Group By Tran.PriCode ;
Having Between(Tran.DatesOn,dDateFrom,dDateUpTo)
All is ok in the above SQL statement as long as the Between() clause is omitted but if I query for transaction records BETWEEN 2 dates, i end up getting data for all the dates (even those outside the desired range)
I would appreciate any help in overcoming this shortcoming.
sincere thanks in advance
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement