The not like operator automatically puts the wildcard characters around the value. I set up the where clause like this:
select * from EC_Order_Header WHERE OrderNumber not like 'ORH%'
since the single quotes would be auto filled by the value being an ansistring
but this way I get to choose where the wildcard character goes
but this is what ran:
select * from EC_Order_Header WHERE OrderNumber not like '%ORH%%'
is this what its supposed to do?
And expected:Where Clause - Not Like
-
- Posts: 472
- Joined: November 16th, 2021, 11:15 am
- Contact:
Where Clause - Not Like
Last edited by CathyC on May 3rd, 2023, 11:50 am, edited 1 time in total. word count: 96
Tags:
-
- Posts: 472
- Joined: November 16th, 2021, 11:15 am
- Contact:
Re: Where Clause - Not Like
If I click the where clause at a higher level, it shows it as I expected and without the wildcard characters, so I think automatically adding them should not be done. Or in the preview show them
word count: 55
-
- Posts: 329
- Joined: August 26th, 2021, 9:18 am
- Contact:
Re: Where Clause - Not Like
This is because of how keys worked and the recommended values we gave for Operator.
like/not like: %{value}%
likeleft: {value}%
likeright: {value}%
likeexact: {value}
Our thoughts are to drop likeleft, likeright, likeexact and do not modify the value for like/not like so you would have to add the % yourself. We would create a dbchange that would go and update all existing values to be %{value}% so they would continue to work as is.
Task 10182 has been created for this.
We would then change the value based on the operator like/not like: %{value}%
likeleft: {value}%
likeright: {value}%
likeexact: {value}
Our thoughts are to drop likeleft, likeright, likeexact and do not modify the value for like/not like so you would have to add the % yourself. We would create a dbchange that would go and update all existing values to be %{value}% so they would continue to work as is.
Task 10182 has been created for this.
word count: 108
-
- Posts: 572
- Joined: August 26th, 2021, 9:56 am
- Contact:
Re: Where Clause - Not Like
This change has been implemented as of DesignTime Revision 2395, RunTime Revision 1059, and ECC Revision 120.
word count: 17