Back to forum list… Back to Issues and Problems...

IMan 4.25 - WHERE clause not parsed correctly (4 replies)

Randy
4 years ago
Randy 4 years ago

We are using an DB Writer to update a table.  After updating IMan from 3.21 to 4.25, we are seeing a weird error thrown.

 

The WHERE clause is:

(IDCUST = %IDCUST AND UPPER(Email) UPPER(%Email)) OR (UPPER(Email) = UPPER(%Email) AND IDCUST %IDCUST)

 

The error we are seeing is "The field [Email))] does not exist.

 

It appears that something is not being parsed correctly in our WHERE clause.

https://www.realisable.co.uk/wp-content/uploads/2020/09/wfica32_2020-08-31_16-30-57.png
https://www.realisable.co.uk/wp-content/uploads/2020/09/wfica32_2020-08-31_16-30-45.png
Randy
4 years ago
Randy 4 years ago

It looks like in general there is an issue with the parsing of the WHERE clause.  Adding extra parenthesis, while not illegal, causes issue in IMan.

Example:

Original query from issue: (IDCUST = %IDCUST AND (UPPER(Email) UPPER(%Email))) OR (UPPER(Email) = UPPER(%Email) AND IDCUST %IDCUST)

Updated query: ((IDCUST = %IDCUST) AND (UPPER(Email) UPPER(%Email))) OR (UPPER(Email) = UPPER(%Email) AND IDCUST %IDCUST)

 

The only difference in the updated query is the extra parenthesis around "(IDCUST = %IDCUST)"

This change will cause IMan to throw the following error almost immediately: The field [IDCUST)] does not exist.

Randy
4 years ago
Randy 4 years ago

As a side note, in MSSQL you seem to be able to add unnecessary parenthesis as well

https://www.realisable.co.uk/wp-content/uploads/2020/09/2020-08-31_16-46-40.png
Randy
4 years ago
Randy 4 years ago

It didn't paste very well, so here's another screenshot of it.  The red boxes highlight the added parenthesis which caused the The field [IDCUST)] does not exist error to start.

https://www.realisable.co.uk/wp-content/uploads/2020/09/2020-08-31_17-14-45.png
Support
4 years ago
Support 4 years ago

Randy, simply place square brackets around the field name.

I.e. %[Email]

Thanks

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close