You need to give us a little more to go on. What exactly do you want to
check about the 3 parameters? Are there description and flag tables similar
to the type table? If you want to return records from main where the
parameters can't be found in the corresponding tables (description and
flag), then you could simply add two more NOT IN criteria ...