using sql server: I have a number of commands that trim a txt file, example: Case when charindex(‘-‘, Substring([RawStreamOut], 179, 10)) > 0 then ‘-‘ + Replace(LTrim(RTRIM(…
Tag: charindex
How to use RegEx in the SQL function CHARINDEX to find the nth occurrence
The intent of the following algorithm is to extract certain set of fields from a key (in this example, extract first 2 fields), and it works. The fields are delimited by a colon: Result: Field-1:Field-2 Microsoft document says that the first parameter is an expression, but I think what they mean by that in the context of CHARINDEX is, that
Converting NVARCHAR to INT after SUBSTRING using CHARINDEX and LEN
I am trying to join two tables using UI’s but the UI in one of the tables has ‘CLIENT_’ before it. When trying to remove the ‘CLIENT_’ from the string and then compare the UI’s I am getting the …