Jump to content

This topic is 5974 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a need to determine if a customer already exists in the table occurence and if so to use it's original id. Here are the tables:

Customer:

Name

Associate Status

Coupon Codes:

Name:

Associate ID

Coupon $ Amt

Coupon Code

Currently one selects the name in Coupon Codes from those identified in Customers as with a positive Associate Status. The Associate ID is a serial id generated on creation. Then one enters the Coupon $ Amt manually and the Coupon Code is generated by calculation.

The problem is an associate customer can have more than one coupon code, but should retain a constant Associate ID. Obviously the Associate ID can't be a simply serial number.

My thought is an if then statement but I am stumped on how to avoid creating recurvsive problems. I am also unsure on how to test if the Name has already been used.

Thanks.

This topic is 5974 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.