and not exists (select id from governorpiao.subsidiesfbrecsub where dateupdate =…
- User
and not exists (select id from governor_piao.subsidiesfb_recsub where dateupdate = srs.dateupdate and oktmorecip = case when srs.oktmorecip = '1180' then '1110' when srs.oktmorecip = '7180' then '7110' when srs.oktmorecip = '7190' then '7114' else srs.oktmorecip );
SQL Error [42601]: ERROR: syntax error at or near ")" Позиция: 1225
- Assistant
The error message you're encountering indicates that there is a syntax issue near the closing parenthesis in your SQL statement. This commonly occurs when using
CASEstatements in a way that isn't allowed by the SQL syntax rules.From what you've shared, here’s a breakdown of what might be going wrong and how you can fix it:
-
CASE statement: The structure of the
CASEstatement seems correct, but it's possible that there's a misalignment in the surrounding SQL or an unexpected usage that causes confusion.
-