I want to do a select in a table named ALBARANES that it's going to show me all the columns of the table. This select has inputs values to do the where clauses.
Inputs: @serie, @client
What I want is: If @serie's value is null then show me all the columns regardles of the column value of ALBARANES.SERIE, but if @serie has a value not null then do a clause using it.
SELECT * FROM ALBARANES AC WHERE AC.SERIE = @serie/*Code when @serie has value not null*/ AC.FECHA < (SELECT CAST ('Now' as date) from RDB$DATABASE)
And the same with the input @client. How can I implement this select?