Skip to content

Commit

Permalink
Set where clause to is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMwashuma committed Nov 6, 2024
1 parent 092d1ca commit d60e81e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tally_ho/apps/tally/management/commands/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def check_duplicates(csv_file_path: str, field: str) -> None:
query = """
SELECT {field}, COUNT(*) AS cnt
FROM read_csv_auto(?)
WHERE {field} IS NOT NULL AND {field} != ''
WHERE {field} IS NOT NULL
GROUP BY {field}
HAVING cnt > 1
""".format(field=field)
Expand Down

0 comments on commit d60e81e

Please sign in to comment.