Two things:
Without the structure of the tables you are using, it's impossible to guess what appropriate code might work. If you can supply these and what you've tried that doesn't work, someone may be able to help.
It's best if you don't write in all caps - it's considered "shouting" and that's rude.
Rick