Check the usage of parameters in the below example:
:fromDate
:toDate
:uname
:fromDate1
:toDate1
:uname1
:fromDate2
:toDate2
:uname2
All the above paramaters are having the same values.
For example:-
select user_name,call_reason from call_tbl, users_tbl where call_placed_dt between :fromdate and :toDate
and user_name = :uname order by user_description
FULL JOIN
select user_name,call_reason from call_mrs_tbl, users_tbl where call_placed_dt between :fromdate1 and :toDate1
and user_name = :uname1 order by user_description
FULL JOIN
select user_name,call_reason from call_tbl, users_tbl where call_placed_dt between :fromdate2 and :toDate2
and user_name = :uname2 order by user_description;
We cannot use the above query as below. It errors out saying invalid datatype.
select user_name,call_reason from call_tbl, users_tbl where call_placed_dt between :fromdate and :toDate
and user_name = :uname order by user_description
FULL JOIN
and user_name = :uname order by user_description
FULL JOIN
and user_name = :uname order by user_description;
No comments:
Post a Comment