Skip to content

Tag: tsql

Sql join only 1 row

I want to join the table CustomerAgreementRole with only one row from AgreementRoleGroup, based on ViewPriority. Example: CustomerAgreementRole can have three rows. I only want the joined row where ViewPriority is highest Current query: Expected result: Answer Made it working with this:

TSQL Two different tables, 800GB vs 2GB Find common

I have two tables, generatedblock table, and addresses table The generatedblock table has a column called expandedblock block. The addresses table has a column called address. What I need to do is find if in the generatedblock table there is a value in the addresses table. I have tried failed code but I am no…