Skip to main content
Hi community,
strange enaugh this is the first time in years I have to do a retrieve in Uniface, "not like" equivalent
so the goal is to have retrieved data with first character not "I" and not "O" for the same field

in sql we easily do in this way:

select * from table where field not like "I%" and field not like "O%"

neither in the read u_where clause or retrieve directly in field, I can make it work

for example if I want to to a like clause I write in the code:

field.table = "I·*·|O·*"

this is correctly translated by the Uniface SQL driver into like I% or like O%

but if I want to do "NOT like", trying this way:

field.table = "·!I·*·!O·*"

is translated wrongly into not like I* and not like O* ,so translated with the * instead of the % symbol. that occurs the same way if I do this in the u_where clause

my bad (and ugly) workaround is to write this in the u_where clause:

read u_where (field.table < "I" | field.table > "Izzzzzzz") & (field.table < "O" | field.table > "Ozzzzzzz")

that points me to insert a condition the read trigger to work as a simple read, or that one

do you all have any suggestion?

thank you
Simone

------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------
Hi community,
strange enaugh this is the first time in years I have to do a retrieve in Uniface, "not like" equivalent
so the goal is to have retrieved data with first character not "I" and not "O" for the same field

in sql we easily do in this way:

select * from table where field not like "I%" and field not like "O%"

neither in the read u_where clause or retrieve directly in field, I can make it work

for example if I want to to a like clause I write in the code:

field.table = "I·*·|O·*"

this is correctly translated by the Uniface SQL driver into like I% or like O%

but if I want to do "NOT like", trying this way:

field.table = "·!I·*·!O·*"

is translated wrongly into not like I* and not like O* ,so translated with the * instead of the % symbol. that occurs the same way if I do this in the u_where clause

my bad (and ugly) workaround is to write this in the u_where clause:

read u_where (field.table < "I" | field.table > "Izzzzzzz") & (field.table < "O" | field.table > "Ozzzzzzz")

that points me to insert a condition the read trigger to work as a simple read, or that one

do you all have any suggestion?

thank you
Simone

------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------
menwhile I found another (not too good) workaround

read where "field not like 'I%' and field not like 'O%'"

using "where" instead of "u_where"

------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------
Hi community,
strange enaugh this is the first time in years I have to do a retrieve in Uniface, "not like" equivalent
so the goal is to have retrieved data with first character not "I" and not "O" for the same field

in sql we easily do in this way:

select * from table where field not like "I%" and field not like "O%"

neither in the read u_where clause or retrieve directly in field, I can make it work

for example if I want to to a like clause I write in the code:

field.table = "I·*·|O·*"

this is correctly translated by the Uniface SQL driver into like I% or like O%

but if I want to do "NOT like", trying this way:

field.table = "·!I·*·!O·*"

is translated wrongly into not like I* and not like O* ,so translated with the * instead of the % symbol. that occurs the same way if I do this in the u_where clause

my bad (and ugly) workaround is to write this in the u_where clause:

read u_where (field.table < "I" | field.table > "Izzzzzzz") & (field.table < "O" | field.table > "Ozzzzzzz")

that points me to insert a condition the read trigger to work as a simple read, or that one

do you all have any suggestion?

thank you
Simone

------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------
Can't you do something like the following?

field.table = "·!I·*·&·!O·*"

------------------------------
David Reed
Tribal Group
------------------------------
Hi community,
strange enaugh this is the first time in years I have to do a retrieve in Uniface, "not like" equivalent
so the goal is to have retrieved data with first character not "I" and not "O" for the same field

in sql we easily do in this way:

select * from table where field not like "I%" and field not like "O%"

neither in the read u_where clause or retrieve directly in field, I can make it work

for example if I want to to a like clause I write in the code:

field.table = "I·*·|O·*"

this is correctly translated by the Uniface SQL driver into like I% or like O%

but if I want to do "NOT like", trying this way:

field.table = "·!I·*·!O·*"

is translated wrongly into not like I* and not like O* ,so translated with the * instead of the % symbol. that occurs the same way if I do this in the u_where clause

my bad (and ugly) workaround is to write this in the u_where clause:

read u_where (field.table < "I" | field.table > "Izzzzzzz") & (field.table < "O" | field.table > "Ozzzzzzz")

that points me to insert a condition the read trigger to work as a simple read, or that one

do you all have any suggestion?

thank you
Simone

------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------

This should work - (with obvious GOLD's in front of !, = and *)
"!=I*&!=O*"

Regards,
Knut



------------------------------
Knut Dybendahl
------------------------------
Can't you do something like the following?

field.table = "·!I·*·&·!O·*"

------------------------------
David Reed
Tribal Group
------------------------------
that seem to work even if the driver continue to translate it into:

I/O function: S, mode: 0, on file/table: TABLE index: 1 >=
Where ((FIELD Not Like 'I*' And FIELD Not Like 'O*'))

with * instead of %

thank you both!

------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------
that seem to work even if the driver continue to translate it into:

I/O function: S, mode: 0, on file/table: TABLE index: 1 >=
Where ((FIELD Not Like 'I*' And FIELD Not Like 'O*'))

with * instead of %

thank you both!

------------------------------
Simone Pecchenino
Labinf Sistemi Srl
IT
------------------------------
This is actually the where clause as generated by Uniface. For details see:
This is not the SQL generated by the driver.

I hope this helps.

------------------------------
Daniel Iseli
Principal Technical Support Engineer
Uniface Services
Rocket Software, Switzerland
------------------------------