I have 2 tables:
- TableOne has fields A,B,C,D,E
- TableTwo has fields B,F,G,H,I,J
User will provide input parameter '@InputParameter' (i.e. field A in TableOne) into TableOne, then need to lookup the B value in TableOne.
With the B value found in TableOne, need to display TableTwo fields with this B value, but only with unique F values
What i have below will return duplicates, but i only want distinct result based on column F in TableTwo. Do i need 2 select statements???
SELECT [TableOne].[A], [TableTwo.*] FROM [TableOne], [TableTwo] WHERE
(([TableOne]. = [TableTwo].)
AND ([TableOne].[A] = @InputParameter))
- TableOne has fields A,B,C,D,E
- TableTwo has fields B,F,G,H,I,J
User will provide input parameter '@InputParameter' (i.e. field A in TableOne) into TableOne, then need to lookup the B value in TableOne.
With the B value found in TableOne, need to display TableTwo fields with this B value, but only with unique F values
What i have below will return duplicates, but i only want distinct result based on column F in TableTwo. Do i need 2 select statements???
SELECT [TableOne].[A], [TableTwo.*] FROM [TableOne], [TableTwo] WHERE
(([TableOne]. = [TableTwo].)
AND ([TableOne].[A] = @InputParameter))