how about
SELECT
case
when t2.col21 = ts and t2.col22 = 1 then 'No Action'
else t1.col14
end as Task
FROM
tab1 t1,
tab2 t2,
(select 'text_sample' ts from dual)t3
where
(t1.col11 = ts or (t2.col21 = ts and t2.col22 = 1))
and t2.col23 = t1.col13;
On Tue, Mar 22, 2011 at 11:34 AM, gayathri Dev <[email protected]> wrote:
> Hi All,
>
> I would like to know if in the Query below can be modified to keep the
> string "text_sample" in one place?
>
>
> SELECT
> case
> when t2.col21 = 'text_sample' and t2.col22 = 1 then 'No Action'
> else t1.col14
> end as Task
> FROM
> tab1 t1,
> tab2 t2
> where
> (t1.col11 = 'text_sample' or (t2.col21 = 'text_sample' and t2.col22 =
> 1))
> and t2.col23 = t1.col13;
>
> Thanks,
> G
>
> --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en