Like operator in Query Reports

I want to use like operator in Query Reports but I am receiving some errors.

select
it.item_group as “Item Group”,
max(cast(mid(it.item_code,5,6) as unsigned)) as “Reference”,
concat(mid(it.item_group,1,4),lpad(cast(max(cast(mid(it.item_code,5,6) as unsigned)) as char),6,‘0’)) as “Latest Item Code”
from tabItem it
group by it.item_group
where it.item_group not like ‘T%’

OR

select
it.item_group as “Item Group”,
max(cast(mid(it.item_code,5,6) as unsigned)) as “Reference”,
concat(mid(it.item_group,1,4),lpad(cast(max(cast(mid(it.item_code,5,6) as unsigned)) as char),6,‘0’)) as “Latest Item Code”
from tabItem it
group by it.item_group
where it.item_group not like (‘T%’)

OR

select
it.item_group as “Item Group”,
max(cast(mid(it.item_code,5,6) as unsigned)) as “Reference”,
concat(mid(it.item_group,1,4),lpad(cast(max(cast(mid(it.item_code,5,6) as unsigned)) as char),6,‘0’)) as “Latest Item Code”
from tabItem it
group by it.item_group
where it.item_group not like T%

OR

select
it.item_group as “Item Group”,
max(cast(mid(it.item_code,5,6) as unsigned)) as “Reference”,
concat(mid(it.item_group,1,4),lpad(cast(max(cast(mid(it.item_code,5,6) as unsigned)) as char),6,‘0’)) as “Latest Item Code”
from tabItem it
group by it.item_group
where it.item_group not like “T%”

No one is working

Use:

it.item_group NOT REGEXP '^T'

You could have better googled it for in mysql forums as this post is not linked to any features of ERPNext or FRAPPE.

I googled it but the solution didn’t work here, I though may be someone has used it before.

Did that given code work for you or not?

No, it didn’t work.

This topic was automatically closed after 36 hours. New replies are no longer allowed.