Title:
Bug 80781:When you are using a sql parameter INSIDE of a sql function, it adds the leading ")" to the parameter name causing it to error out
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Micky Dionisio / Micky Dionisio (micky.dionisio)
Created: 11/24/2009
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 270817
Priority/Frequency: Minor / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
When you are using a sql parameter INSIDE of a sql function, it adds the leading ")" to the parameter name causing it to error out. So a parameter named :my_param that is used inside a function like so - someSQLUDF(:my_param), will say that "myparam)" doesn't exist. The work around for this is to add a SPACE before and after the param declaration inside of the function.
Method:
query.setSQL("select name from bleh where name like someUDF(:my_param)"); //wont compilequery.setSQL("select name from bleh where name like someUDF( :my_param )"); //will compile
Result:
Named Sql parameter 'my_param)' used in the query not found in the queryparams
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040448
External Customer Info:
External Company:
External Customer Name: Micky Dionisio
External Customer Email: 59E23BAD476987309920154A
External Test Config: 11/24/2009
Attachments:
Comments: