[Home] [Help]
3041: and (rev_var.variable_value is not null and rev_var.variable_value <> '_________' )
3042: and exists(select 'x' from okc_bus_variables_tl bustl where bustl.variable_code = rev_var.variable_code)) OR
3043: (kart_var.variable_value is not null and rev_var.variable_value <> kart_var.variable_value))
3044: OR (kart_var.variable_type<>'U' and exists
3045: (select 'x' from okc_variable_doc_types var_doc where var_doc.variable_code = rev_var.variable_code
3046: and var_doc.doc_Type = p_document_type))
3047: )
3048: and rev.document_type = p_document_type and rev.document_id = p_document_id
3049: and nvl(rev.action,'NOCHANGE') not in ('DELETED','MERGED')
3082: and busb.variable_intent = p_intent)
3083: )
3084: OR
3085: (rev_var.variable_type <> 'U'
3086: and exists (select 'x' from okc_variable_doc_types var_doc where var_doc.variable_code = rev_var.variable_code
3087: and var_doc.doc_type = p_document_type)
3088: )
3089: )
3090:
3096: select rev.review_upld_terms_id, rev_var.variable_code, rev_var.variable_type
3097: from okc_review_upld_terms rev, okc_review_var_values rev_var
3098: where document_type = p_document_type and rev.document_id = p_document_id
3099: and rev_var.review_upld_terms_id = rev.review_upld_terms_id
3100: and ((rev_var.variable_type in ('S','D') and not exists (select 'x' from okc_variable_doc_types var_doc where var_doc.variable_code = rev_var.variable_code
3101: and var_doc.doc_type = p_document_type))
3102: OR (rev_var.variable_type = 'U' and not exists (select 'x' from okc_bus_variables_b busb where busb.variable_code = rev_var.variable_code
3103: and busb.variable_intent = p_intent))
3104: )
3117: and busb.variable_intent = p_intent)
3118: )
3119: OR
3120: (rev_var.variable_type <> 'U'
3121: and exists (select 'x' from okc_variable_doc_types var_doc where var_doc.variable_code = rev_var.variable_code
3122: and var_doc.doc_type = p_document_type)
3123: )
3124: )
3125: and rev.action = 'ADDED' ;
3139: and busb.variable_intent = p_intent)
3140: )
3141: OR
3142: (rev_var.variable_type <> 'U'
3143: and exists (select 'x' from okc_variable_doc_types var_doc where var_doc.variable_code = rev_var.variable_code
3144: and var_doc.doc_type = p_document_type)
3145: )
3146: )
3147: