Reading errors
Terminologies & Code Systemsarticle · 4 min · updated Oct 19, 2026

Reading errors

By Rajendra Sharma, RN, CPC, CPBReviewed by Rajendra Sharma, RN, CPC, CPB · Oct 19, 2026

SQL for Health Data: Reading errors.

Errors tell you where to look

Every beginner sees error messages. They are not scolding. They are directions. This lesson shows two real ones, what they mean, and what to check.

A misspelled keyword

Here is a query with a typo, and what the database says. Near select, with one l missing, there is a syntax error. The database does not guess what you meant. It points at the word where it lost the thread. Fix the spelling, and the query runs.

  • SELEC patient
  • FROM visits
  • WHERE clinic = 'North';
  • SELECT patient
  • FROM visits
  • WHERE clinic = 'North';

A column that does not exist

Now a different message. No such column: sytolic. The query is well formed, but the database has no column with that name. Look at the name it quotes. It is missing an s. The message gives you the exact word to check against the table. Correct the spelling and the query returns its rows.

  • SELECT patient, sytolic
  • FROM visits
  • WHERE clinic = 'North';
  • SELECT patient, systolic
  • FROM visits
  • WHERE clinic = 'North';

A message, and what to check

Here are four real messages, and where to look. Near, then a word, syntax error: check the spelling and punctuation around that word. No such column, then a name: check the column name against the table. No such table, then a name: check the table name. And an unrecognized token: check that every quote is closed.

  • near "SELEC": syntax error · Spelling around that word · pencil · navy
  • no such column: sytolic · The column name · tag · navy
  • no such table: visit · The table name · box · amber
  • unrecognized token: "'North;" · Every quote is closed · warning · slate

Check yourself

Pause and think. A message says: no such column, sytolic. What should you check first? The answer: the spelling of the column name.

  • The spelling of the column name
  • Whether the table has enough rows
  • The order of the rows
  • Whether the clinic is open

Keep these in mind

An error message is a direction, not a verdict. A syntax error names the word where it lost the thread. For no such column or table, check the name it quotes. And check that every quote is closed.

  • An error message is a direction, not a verdict
  • A syntax error names the word where it lost the thread
  • No such column or table: check the name it quotes
  • Check that every quote is closed

SNOMED CT®, LOINC®, ICD and other terminologies are the property of their respective owners and are shown for education under their licences. Licences & attributions