Hi
Im having this scenario:
3 tables: Main, Prod and Docs
Main consists of 3 entities: Repno(PK), Type, Number. Type is a 2 valued field with the values "prod" and "docs"
Number is a lookup from either of the below written tables (prod and docs)
Prod has 2: Number(PK), Description
Docs has 2: Number(PK), Description
My question is: Is it possible in [main.Number] to determine from the value in [main.Type] what table to get the values from?
Somethink like this in pseudo-code:
IF [main.type] = 'docs' THEN SELECT * FROM Docs
ELSE
IF [main.type] = 'prod' THEN SELECT * FROM Prod
Hope this explains what im looking for.
In advance thanks
Claulle
Im having this scenario:
3 tables: Main, Prod and Docs
Main consists of 3 entities: Repno(PK), Type, Number. Type is a 2 valued field with the values "prod" and "docs"
Number is a lookup from either of the below written tables (prod and docs)
Prod has 2: Number(PK), Description
Docs has 2: Number(PK), Description
My question is: Is it possible in [main.Number] to determine from the value in [main.Type] what table to get the values from?
Somethink like this in pseudo-code:
IF [main.type] = 'docs' THEN SELECT * FROM Docs
ELSE
IF [main.type] = 'prod' THEN SELECT * FROM Prod
Hope this explains what im looking for.
In advance thanks
Claulle