trim removes characters from your string, by default it's the whitespace,
you can also pass a list of chars to remove other than just whitespace.
more info: https://learn.microsoft.com/en-us/sql/t-sql/functions/trim-transact-sql?view=sql-server-ver15
It seems like you want the data parsed out and put into a table in columns where it can be used. If this is the case here is one way to do that:
create table tester (id int identity(1,1) primary key, col varchar(max),prod varchar(100),Line int, LQ varchar(10))
insert into tester (col) values ('prod: UNK, Line=1, LQ=N')
insert into tester (col) values ('prod: UNK, Line=2, LQ=N')
insert into tester (col) values ('prod: UNK, Line=3, LQ=N')
insert into tester (col) values ('prod: UNB, Line=1, LQ=T')
--parse out prod
update tester set prod = substring(col,charindex('prod: ',col)+6,charindex(',',col)-charindex('prod: ',col)-6) from tester
--parse out Line
update tester set line = substring(col,charindex('Line=',col)+5,charindex(',',col,charindex(',',col)+1)-charindex('Line=',col)-5) from tester
--parse out LQ
update tester set lq = substring(col,charindex('LQ=',col)+3,len(col)+1-charindex('LQ=',col)-3) from tester
select * from tester
drop table tester
Which gives you this:
