cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Flexible Search Query (with exists clausule)

Former Member
0 Kudos

Hi,

I'm trying to execute a query

SELECT {Product:PK} FROM {Product AS Product } WHERE (
EXISTS
(
{ { SELECT {feat.pk} FROM {ProductFeature AS feat}
WHERE {feat.classificationAttributeAssignment}= ?paramClassAssign AND {feat.product}={Product.pk}
AND {feat.language} IS NULL AND {feat.numberValue} = ?paramValue
}
}
) AND {Product:catalogVersion} = ?catalogVersion )

but the console is giving me an error:

cannot find (visible) type for alias { SELECT {feat within [Product:Product]

Anyone knows what I'm doing wrong here?

Thanks,

Luiz.

Accepted Solutions (1)

Accepted Solutions (1)

cieslo
Active Participant
0 Kudos

Hi Luiz,

the problem is with space between the 2 curly braces starting the subquery in EXISTS clause. You have

...EXISTS ( { { SELECT...
and this should look like this
...EXISTS ( {{ SELECT...
also the closing curly braces should be kept together, not
}
}
but
}}
Former Member
0 Kudos

it worked! thank you!

Answers (1)

Answers (1)

Former Member
0 Kudos

same error with the following: {p.PK} from {Product as p JOIN Product2TargetOnlineCatalogs as pt ON {p.PK}={pt.source} JOIN TargetOnlineCatalogEnum as t ON {pt.target}={t.PK}} WHERE {t.code}='CODE'