Hi,
I'd previously posted a query and following a reply realised
I was completely barking up the wrong tree hence this second post. I'm using Crystal 2008 btw.
I’m planning on using the datediff function to calculate the
number of weekdays from the request for some equipment to when it is issued but
my initial selection criteria omits numerous records that include the date I
want to check against.
The WorkTable links on ROWID to the EquipmentTable. ROWID is a text string that ends in /001, /002,
/003 and so forth.
ReferralTable WorkTable EquipmentTable
Dept ROWID ---------- ROWID
ReferralID ------ ReferralID IssuedDate
DateofWork
Notes
My Select uses parameters for the user to enter the chosen date range of issued equipment
IssuedDate in @FromDate to @ToDate
So for example someone might state that equipment is needed on ROWID /002
and then two other entries /003 and /004 are entered with various notes (item out of stock, item ordered etc) and eventually it is issued
on ROWID /005. I would specify the DateofWork for either ROWID /001 or /002 as the one to check dependant on Dept in
the ReferralTable as they have different deadlines. The problem is that
the link to EquipmentTable is on ROWID so it only seems to have linked to the matching
ROWID in the WorkTable in which the equipment was issued, in the example above
this would be ROWID /005 as that was the one in which the equipment was issued
and the ROWID /002 which contains the DateofWork I need to check is
discarded as any ROWID’s not linked to EquipmentTable are not retrieved.
My current thinking is that I create a COMMAND to add some kind
of buffer table between WorkTable and EquipmentTable that will still ensure all
WorkTable entries are received.
ReferralTable WorkTable Command EquipmentTable
Dept ROWID ROWID -------> ROWID
ReferralID ------ ReferralID ----> ReferrallD IssuedDate
DateofWork
Notes
However it freezes when run and I have to head into Task
Manager to shut Crystal down.
Any suggestions or do you think the is a no hoper due to the design of
the database itself.
Ben