In SQL Server, I am trying to select some of the records using a string which has space so I trim and use but something is wrong please correct me where something is missed by me.
SELECT * FROM projects where str_id=ltrim(rtrim(' artf130 ')) --- No rows selected SELECT * FROM projects where str_id='artf130' -- one row selected
Update: I copied the first line from google spread sheet.
Maybe that was my bad. People keep helping. I think my comment was enough, cause I linked to a very similar problem, which got a answer. So here for everyone: