Hey,
how do i make a query between two datasources and with the given conditions in the sql statement below, would greatly appreciate any help.
SELECT *
FROM Table1
LEFT JOIN Table2 ON Table1.RelatedField = Table2.RelatedField
WHERE Table1.Field = ‘someValue’
OR (Table1.Field = ‘someValue’ AND Table2.Field= ‘someValue’)
What exactly do you need from us? Do you mean that you don’t know how to create a query at all, or do you know that but not how to deal with the combined OR/AND condition, or what?
hey martin thanks for replying,
yes i do know how to create a query, what im having trouble with is a combined OR/AND condition.
Is “someValue” really the same value? If so, you can greatly simplify your logic. It says that Table1.Field must be ‘someValue’ and the value of Table2.Field is irrelevant.
For reference, the same thing is also discussed in Dynamics Community forum.