Extraer cadena segun caracter


/ Published in: SQL
Save to your folder(s)

Extrae subcadena de cadena separado por caracter


Copy this code and paste it in your HTML
  1. SELECT
  2. CASE
  3. WHEN CHARINDEX('(', Val) > 0 THEN
  4. RTRIM(SUBSTRING(val,1, CHARINDEX('(', Val) - 1))
  5. ELSE Val
  6. END
  7. FROM @DATA

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.