Hi All
I am looking for help with the following scenario.
I have 3 tables
Consumer --> Brand -- > Campaign
I would like to return Consumer, for firstName, lastName and DateOfBirth,
and Brands, for brandName
and Campaigns for campaignCode.
The Result from my query must be Consumer, i.e
From Consumer con
where con.firstName = ?
and con.lastName = ?
and con.dateOfBirth = ?
and con.brand.name =?
and con.brand.campains.campaignCode = ?
The Consumer must always be returned if the firstName, lastName, dateOfBirth matches, otherwise nothing must be returned.
All brands that match brandName must be contained in the Consumer
All Campaigns that match campaignCode must be contained in the Consumer.Brand.
Any help would be appreciated
Thanks in advance
Jeff Singer
|