OHDSI / OHDSI/Characterization

Use `ISNULL` in place of `IFNULL` in queries

Open Beginner friendly
#94 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

fixed
Dominant language
R
Stars
3
Forks
6
Avg merge
2h 11m
Merged PRs (30d)
4

Description

The IFNULL function is not fully supported across all RDBMS platforms and as a result it will fail on those systems that don't support it (i.e. SQL Server). Replacing with ISNULL should fix it. Here are the queries where I found IFNULL:

https://github.com/OHDSI/Characterization/blob/ca4f13f41056b022b4f17af07eaa9d8a83e72c25/inst/sql/sql_server/RiskFactorBinaryExtraction.sql#L35-L40

https://github.com/OHDSI/Characterization/blob/ca4f13f41056b022b4f17af07eaa9d8a83e72c25/inst/sql/sql_server/RiskFactorContinuousExtraction.sql#L37-L59

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with inst/sql/sql_server/RiskFactorBinaryExtraction.sql around lines 35-40 and inst/sql/sql_server/RiskFactorContinuousExtraction.sql around lines 37-59. Review the listed queries for IFNULL usage, make the requested SQL Server compatibility change, and verify that both files no longer contain the unsupported function.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.