i2b2 Developer's Forum
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Text constrain options

Sql

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="15dafd60-8f4b-45ca-8bcd-995063b3f349"><ac:plain-text-body><![CDATA[

LIKE[exact] 
]]></ac:plain-text-body></ac:structured-macro>
     Case insensitive search.

<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f4b4e5f1-380e-4cd5-b675-c9d43f39089f"><ac:plain-text-body><![CDATA[        <value_operator> LIKE[exact]</value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint> NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
Concept_cd in (select concept_Cd from concept_dimension where ..)  and
valtype_cd = 'T' and
 upper(tval_char) =  upper('NEG')

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8f6cdd6f-d01c-479d-b7bf-70cf2310c8bc"><ac:plain-text-body><![CDATA[

LIKE[begin]
]]></ac:plain-text-body></ac:structured-macro>
    Begin will be the default option if the optional tag is not present. This will support backward compatibility.

<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="bebaf88d-d263-48bd-8352-1f07fc54084b"><ac:plain-text-body><![CDATA[        <value_operator>LIKE[begin]</value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint> NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
Concept_cd in (select concept_Cd from concept_dimension where ..)
and
valtype_cd = 'T' and
 upper(tval_char)  LIKE upper('NEG%') 

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5a6c707c-583d-497c-af4d-73059d787163"><ac:plain-text-body><![CDATA[

LIKE[end]
]]></ac:plain-text-body></ac:structured-macro>

<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c6a0c89a-5e06-4f44-a633-ac2c78db72a1"><ac:plain-text-body><![CDATA[        <value_operator>LIKE[end]</value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint> NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
Concept_cd in (select concept_Cd from concept_dimension where ..)
and
valtype_cd = 'T' and
 tval_char  LIKE '%NEG'

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="455aaffd-d541-4a08-863c-9d40167da69f"><ac:plain-text-body><![CDATA[

LIKE[contains]
]]></ac:plain-text-body></ac:structured-macro>

<constrain_by_value>
      <value_type>TEXT</value_type>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ce91bdba-b0a7-4dc3-a3c4-0036ee1fb823"><ac:plain-text-body><![CDATA[        <value_operator>LIKE[contains] </value_operator>
]]></ac:plain-text-body></ac:structured-macro>
      <value_constraint>NEG </value_constraint>
 </constrain_by_value>

Select * from  observation_fact where
concept_cd in (select concept_Cd from concept_dimension where ..)
and
valtype_cd = 'T' and
 tval_char  LIKE '%NEG%'

...