Small problem - although it works perfectly with the specific selection, there are another 8 that need the same change, but using the same code it doesn't work when one of more of the of the fields I'm checking against are from the Financial table and even though I've spent the morning messing around with the SQL to try and get it to work, I can't
I also noticed that there could be a time when the user wanted to show Final records only, so modified the temporary selection code (where required) as follows:
INNER JOIN (SELECT ValuationID, MAX(InputStage) AS IStage
FROM Financial F GROUP BY ValuationID) AS FIN ON FIN.ValuationID = V.ValuationID
AND IStage = 2
I have a fixed piece of SQL for each selection, and can append the extra code using string.Format when the condition is true, but I just want to check that this is the right place to insert this?
Thanks in advance
Martin