I need to search a field in a table for records with similar values. For example, an invoice number, “123”, may also appear as “0123”. Here is the query I wrote, which doesn’t give me any results. I even created a record that looks like the example. Any suggestions.
SELECT *
FROM dbo.tbl_cds_paid
WHERE (inv_no LIKE ‘%’ + rtrim([inv_no])) and inv_no <> inv_no