I'm not sure if it is possible through SQL.
I have 2 tables:
- (int Contract_ID, int PR_nmb, bool Check)
- (int PR_ID, int PR_nmb, date Creation_Date)
This is 1 to many connection, for each Contract I have many PR with the same PR nmb. I want to take pr_nmb from table 1, then check in table 2 if all PR were created in current year and return true or false in Check.
Could I do this in SQL? Or it is better to write this logic on C#? Any advices are welcome.