|The stupid question is the question not asked|
Flexible Update SQLby bichonfrise74 (Vicar)
|on Dec 02, 2010 at 00:43 UTC||Need Help??|
bichonfrise74 has asked for the
wisdom of the Perl Monks concerning the following question:
I am trying to construct a flexible update SQL so that I can just pass the parameters that I want and it will construct the update SQL correctly for me. I have the code below.
If I pass all the parameters to the subroutine, it gives me the correct update SQL. The problem starts when I start passing some null parameters.
For example, if I start passing some null parameters, the subroutine would create it like this:
The correct one that I am hoping for is this (without the city assuming that I pass a null value for this parameter):
So, to summary the problems: