In CustomSQL are all Input fields mandetory

Hello,
We are using JDBC Adapter 6.5 on IS 7.1
I would like to know In CustomSQL are all Input fields mandetory.
I have customeSQL like
Update Table1 SET Field1= ?, Field2=? where Field3=?

So I am passing Input1 for field1, Input2 for field2 and Input3 for field3

But Input1 & Input2 are optional that menas they may not present all the time.

I get the error if Input1 or Input2 are not present.

Is there a way to write a query so that if Input1 or Input2 are not present even then it will work. Sothing like
Update Table1 SET Field1= value of Input1, Field2=value of Input2 where Field3=value of Input3

Thanks,
VJ

You might want to investigate using the Dynamic SQL template where you can build a portion of the query on the fly.

For the CustomSQL template, each ? must have a variable available, which can be empty but cannot be null.