cancel
Showing results for 
Search instead for 
Did you mean: 

'[Param.1]' becomes ''value'' in an upgraded to 12.2

Former Member
0 Kudos

Hi,

The system I am using was upgraded last weekend from 12.1 to 12.2.

My SQL inserts quit working, I noticed that where I need a single quote, MII is now putting double quotes in the insert.

Anybody knows how to fix this?

This statement:

EXECUTE Input.SPMII_InsertOrderHeader [Param.1], [Param.2], '[Param.3]', [Param.4], [Param.5], '[Param.6]', '[Param.7]', '[Param.8]', '[Param.9]', '[Param.10]', [Param.11], [Param.12], [Param.13]

Becomes:

EXECUTE Input.SPMII_InsertOrderHeader 000001738942, 000000000000051649, ''XXXXX 16oz/12 US'', 2030, L360, ''2013-01-20'', ''REL  PRT  CNF  PRC  GMPS ILAS MACM PDLV*'', ''2013-01-21T18:48:24'', ''2013-01-21T18:48:24'', ''2013-01-21T18:48:24'', 534.87, MIN, 325

Instead of:

EXECUTE Input.SPMII_InsertOrderHeader 000001738942, 000000000000051649, 'XXXXX 16oz/12 US', 2030, L360, '2013-01-20', 'REL  PRT  CNF  PRC  GMPS ILAS MACM PDLV*', '2013-01-21T18:48:24', '2013-01-21T18:48:24', '2013-01-21T18:48:24', 534.87, MIN, 325


Thanks Andy.

Accepted Solutions (0)

Answers (2)

Answers (2)

jcgood25
Active Contributor
0 Kudos

If you are running the latest patch for 12.2, and you can confirm that the Param.x values don't include single quotes (from wherever they are being set), then it would appear to be a bug and you should log a customer ticket.

Doing a simple FixedQuery test like SELECT '[Param.1]' AS Foo and inputting a string on the Parameters tab is the simplest way to rule out any additional application logic.  You could also look in the logs (depending upon your log level - INFO would show the parameter values along with your query strings for the template).

HariCS23
Contributor
0 Kudos

Hi Andy, Looks like MII uses 'sp_prepexec' to execute what is there in query template. Since the text in query template is passed as parameter to above SP at run time, it escapes ' with '' .

Try replacing execute with exec.

Hope this helps.

Thanks

Hari