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:
You can see the answer to that question here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With