I'm trying to put together a query that can filter out a specific special character with the added condition that it will only give you the results if that special character only appears a certain number of times (in this case once).
My current query:
select k.name as 'GroupName'
, k.Type as 'Factor'
From Kf as k
Join KfChildren as kc on k.ID = kc.id
Join Kf as k1 on kc.ChildID = k1.id
where k.name like ('ASX:%') --special character needed ":"
I'm looking for the query to bring back:
ASX:TRANSPORTATION
and not:
ASX:TSG:PSG:Rollers
Is this something that is doable or should I just try and figure something out?
Thanks in advance for anyone posting any responses to this :)