SC cuts my MySQL Query (CHAR_LENGTH)

Hi all
only one simple questions:
I have a grid. Why Scriptcase change this MySql Statement from

SELECT  IF(CHAR_LENGTH(`Description`) < 3,'Enter Description', `Description`) FROM table

to

SELECT  IF(`Description` < 3,'Enter Description', `Description`) FROM table

???
It removes the function name CHAR_LENGTH. In PHPMyAdmin works the 1st query with no problems…

Thanks.
Steve

The basic sql is parsed by scriptcase to retrieve fieldnames etc. This parsing is not always right, I’ve had issues with union and others. It’s up to scriptcase to tell if this is a bug or not. I think that this is too complex to be used in a grid as SC cannot decide which fields to generate. In SC the generated fields are static, not dynamic.

I think I had a similiar problem a while and if memory serves right it was because I started the statement with a function.
Ty to have a field before the function, like:

SELECT some_field, IF(CHAR_LENGTH(Description) < 3,‘Enter Description’, Description) FROM table

jsb

[QUOTE=jsbinca;37381]I think I had a similiar problem a while and if memory serves right it was because I started the statement with a function.
Ty to have a field before the function, like:

SELECT some_field, IF(CHAR_LENGTH(Description) < 3,‘Enter Description’, Description) FROM table

jsb[/QUOTE]

Thank’s for this. Works, if you not Link this field :slight_smile: But i link this field to another application, and then, works not.