Skip to content
Advertisement

SQL Subquery as expression

I have the following two tables:

I want to be able to return all the claims that are a specific FormType and AdjustmentVersion.

Given the following query:

How do I correct the syntax to match the AdjustmentVersion on the given integers and the subquery at the same time? Currently, I am getting error ‘Subquery returned more than one result’.

I tried using and OR with AdjustmentVersion but that ended up ignoring the FormType = ‘DEN’

Advertisement

Answer

You can split the values into two sets, the literals and the subquery:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement