Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Query question

edited July 2004 in End User
Hi All,
I am using D5, RB Enterprise v6.03 & Interbase (Firebird).

I have an end user that is trying to create a report using the query wizard.
There are two tables...on called members the other called frontdeskcomments.
We are trying to get a list of all members who DO NOT have an entry in the
frontdeskcomments table.

I can do this if I hard code the sql, but it is slow and difficult for the
user to change the 'where' conditions.

Is there a way to do this w/o hard coding the sql? I've tried using two
dataviews and linking them, but I only get the option to 'include records
that have a match in the other table', or 'include all records regardless if
they have a match in the other table or not. What I am trying to do is
return all records that do NOT have a match in the other dataview.

Any suggestions,
Stacey

Comments

  • edited July 2004

    With ReportBuilder 7.04, you can specify a subselect statement for a search
    condition. I think that is what you need.

    example:

    Select *
    from members
    where memberID not in (Select memberID from frontdeskcomments)

    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2004
    Nard Moseley (Digital Metaphors) wrote:
    Nice feature...didn't know until know!!!
    ;-)
This discussion has been closed.