Versions Compared

Key

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

...

  • for lc_class_number, you may want to cast it as NUMERIC if you are going to use it to sort by call number (otherwise it will sort as Text). It will then display with commas, but when you export it to Excel, the commas will disappear: SUBSTRING (call_number,'\d{1,}\.{0,}\d{0,}')::NUMERIC as lc_class_number

  • To get rid of a trailing "." at the end of the parsed-out LC class number, use this expression: 

    trim (TRAILING '.' FROM substring (he.call_number, '\d{1,}\.{0,}\d{0,}'))

    for


  • second_cutterFor first and second cutters, the result will show a decimal point followed by the letter and number components.

To eliminate the leading decimal point

...

, use

...

these expression:

first cutter: trim (LEADING '.' FROM SUBSTRING (call_number, '\.[A-Z][0-9]{1,}'))
second cutter: trim (LEADING '.' FROM SUBSTRING (call_number, '\s{1}[A-Z]{1}\d{1,}x{0,}a{0,}b{0,}'))

  • internal_year is for parsing out thesis years and other locally-entered numbers in a collection (Law items, for example)