Guest_imported
New member
- Jan 1, 1970
- 0
hi,
i am a novice SQL user. i have a problem for which i need to use if else statement. Can i use it in SQL.
the example:
if main_class="M"
select a, b, c
from z
where mt_policy=z.aci_doc_no1(i have to use this if doc_type=p)
where cc_policy=z.aci_doc_no1(i have to use this if doc_type=b)
if main_class<>"M"
select s, a, m
from z
where mt_policy=z.aci_doc_no1(i have to use this if doc_type=p)
where cc_policy=z.aci_doc_no1(i have to use this if doc_type=b)
i am a novice SQL user. i have a problem for which i need to use if else statement. Can i use it in SQL.
the example:
if main_class="M"
select a, b, c
from z
where mt_policy=z.aci_doc_no1(i have to use this if doc_type=p)
where cc_policy=z.aci_doc_no1(i have to use this if doc_type=b)
if main_class<>"M"
select s, a, m
from z
where mt_policy=z.aci_doc_no1(i have to use this if doc_type=p)
where cc_policy=z.aci_doc_no1(i have to use this if doc_type=b)