Subject | Re: Optimizing a count query |
---|---|
Author | dinol.softedge |
Post date | 2008-10-12T10:18:52Z |
What I really want is this. The query must always show 1 master
record irrespective of the number of detail records but there must
also be a row that shows whether there are details records such as a
boolean field. The count is not important. Does this make sense?
record irrespective of the number of detail records but there must
also be a row that shows whether there are details records such as a
boolean field. The count is not important. Does this make sense?
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 19:48 12/10/2008, you wrote:
> >Thanks Helen and Kjell
> >
> >Helen won't that create multiple rows if there is more than one
> >employee?
>
> Yes, it will, if you have multiple employees on that job card. You
said "I don't need to count the employees, just find out if there is
at least one per record in the tbl_job_card table".
>
> So what you really meant was, you want one and only one record if
there are *any" matching records for the tbl_job_card ID in
TBL_JOB_CARD_EMPLOYEE, is that correct?
>
> ./heLen
>