(I have tried incorporating it directly into the Where with no luck.)
Prompt
Prompt +------------------------------------------+
Accept Choice Prompt '| Search by 1-EmpNo 2-EName : '
Accept Value Prompt '| Please enter Value : '
Prompt +------------------------------------------+
Set Term Off
Column WhereClause New_Value xWhere
Select Decode(&Choice, 1, 'EmpNo=&Value',
2, 'EName='||Upper('''&Value''')
)
As
WhereClause
From Dual;
Set Term On
Select EmpNo, EName, Job, HireDate, DeptNo
From Emp
Where &xWhere;
No comments:
Post a Comment