There are multiple versions of records in the srs_marctab table in the CUL LDP. The correct version is called ACTUAL. Here is an example of how you might specify getting the ACTUAL version.


language_extract AS (

SELECT

     sm.instance_id AS instance_id,

     substring(sm.content, 36,3) AS LANGUAGE,

     sr.state,

     sr.id

FROM srs_marctab AS sm

LEFT JOIN srs_records AS sr on sr.id = sm.srs_id

WHERE

     sm.field = '008'

AND sr.state = 'ACTUAL'



  • No labels