Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

     jsonb_extract_path_text (users.jsonb,'active')::BOOLEAN aspatron_status----- this gets the patron status id, which is a boolean value; note that I have to cast the extract as "boolean"

...

            END AS patron_status_name,  -------- this Case When statement is just for displaying the boolean value as "Active" or "Expired"

     jsonb_extract_path_text (users.jsonb,'personal','lastName') aslast_name------- this extrcts the last name from the "personal" object (second-level extraction)

...