Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
![](https://s.yimg.com/ag/images/default_user_profile_pic_192sq.jpg)
Gulzar Yaseen
ORACLE SQL How I can select the data in such a way that I enter only one value either date or or SRN_Num ...?
How I can select the data in such a way that I enter only one value either date or or SRN_Num the end use have choice to select either date or SRN_num if end user select date the out put should be according to date and if end user put SRN_Num then the oputput according to SRN_Num plzzz Guide me...
-------------------------------------------------------------------------------------------------
Select I16.Dep_Num,Initcap(C8.Bas_Des)Deprtment,Decode(I16.Srn_Typ,1,'Normal Return', 2, 'Personal Scrap Return', 3, 'Personal Good Condition Retrun') SrnTyp,I16.Srn_Dte,
Decode(I16.Srn_Flg,0, 'Enter', 1, 'Approval', 2, 'Cancel') SrnFlg,I17.Itm_Cod,
Initcap(C3.Itm_Des)ItmDes,Initcap(C4.Uom_Abr)UomAbr,I17.Rtn_Qt1,I16.Srn_Num,
Initcap(A32.Mch_Des)MchDes,I17.Mch_Cod,I17.Cst_Cnt,Initcap(C3.Itm_Abr)Loc,I16.Cr_Id
From smlbhone.INV_01_16 I16,smlbhone.INV_01_17 I17,smlbhone.CRP_00_03 C3,smlbhone.CRP_00_04 C4,smlbhone.CRP_00_08 C8,smlbhone.ACC_01_32 A32
Where I16.Srn_Num = I17.Srn_Num
And I16.Bas_Cod = I17.Bas_Cod
And C3.Itm_Cod = I17.Itm_Cod
And C4.Uom_Cod = C3.Uom_No1
And A32.Mch_Cod = I17.Mch_Cod
And C8.Bas_Cod = I16.Dep_Num
and I16.srn_num=:p_num
and I16.srn_dte between :P_StrDte and :P_EndDte
1 AnswerProgramming & Design8 years ago