Category Archives: SQL Commands

SQL Command To Retrieve Code List Based on Certain Criteria

Below is an SQL command to return the code list entry based on certain criteria

SELECT DISTINCT codelist_xref_item.sender_item,
codelist_xref_item.receiver_item,
codelist_xref_item.text1
FROM     codelist_xref_item,
codelist_xref_vers
WHERE   codelist_xref_item.list_name = ‘KEU_SNDPRN_XREF’
AND codelist_xref_item.list_name = codelist_xref_vers.list_name
AND codelist_xref_item.list_version = codelist_xref_vers.default_version
AND codelist_xref_item.sender_item = ‘9001910000006’