I am writing one procedure and in that i am giving three inputs ie account number and from date and to date, and i will give any one inupt ie account number or (from and to dates).

So in the procedure i want to select records from table and in where condition depending on input ie account number or from and to dates, so i am not able to write query,

I will write the query here what i know, please corrct the query bcoz...