C
chuckw
Hi,
I'm not very familiar with IF Then Statements but I know
I need one.
We want to send out coupons for $10 off a treatment. We
have four types of treatments: Massage, Facials, BTA and
BEAs. There are more than one kind of Massages, Facials
etc. which are represented by codes. There is FAC1,
FAC2, MAS1, MAS2, MAS3, BEA1, BEA2, BTA1, BTA2.
What we are trying to do is to find everyone who had a
massage but not a facial. This would be everyone who has
had MAS1, MAS2 or MAS3 but not FAC1 or FAC2. We would
then send them a Letter with a coupon for a facial. We
also only want to send this once. So if they only get
the letter with the coupon one time.
To make things a little more complicated, we also want to
find everyone who has had a facial but not a massage (or
FAC1, FAC2 but not MAS1, MAS2 or MAS3) and send them a
coupon for a facial. I probably have to do this in two
different queries but it would be nice to place this
under one button.
Can anyone help with the SQL?
Thanks,
Chuck
I'm not very familiar with IF Then Statements but I know
I need one.
We want to send out coupons for $10 off a treatment. We
have four types of treatments: Massage, Facials, BTA and
BEAs. There are more than one kind of Massages, Facials
etc. which are represented by codes. There is FAC1,
FAC2, MAS1, MAS2, MAS3, BEA1, BEA2, BTA1, BTA2.
What we are trying to do is to find everyone who had a
massage but not a facial. This would be everyone who has
had MAS1, MAS2 or MAS3 but not FAC1 or FAC2. We would
then send them a Letter with a coupon for a facial. We
also only want to send this once. So if they only get
the letter with the coupon one time.
To make things a little more complicated, we also want to
find everyone who has had a facial but not a massage (or
FAC1, FAC2 but not MAS1, MAS2 or MAS3) and send them a
coupon for a facial. I probably have to do this in two
different queries but it would be nice to place this
under one button.
Can anyone help with the SQL?
Thanks,
Chuck