Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions data-tool/flows/corps/corp_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@ def get_corp_event_filing_data_query(corp_num: str, event_id: int):
where 1 = 1
and e.corp_num = '{corp_num}'
and e.event_id = {event_id}
and not (
(select corp_name
from corp_name
where corp_num = '{corp_num}'
and start_event_id < {event_id}
and (end_event_id is null or end_event_id >= {event_id})
and corp_name_typ_cd in ('CO', 'NB')
order by start_event_id desc
limit 1) = null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
limit 1) = null
limit 1) is null

and (cn.corp_name is null or cn.corp_name = '')
)
order by e.event_id
;
"""
Expand Down