About 56,000 results
Open links in new tab
  1. Get everything after and before certain character in SQL Server

    Jun 13, 2012 · I got the following entry in my database: images/test.jpg I want to trim the entry so I get: test So basically, I want everything after / and before . How can I solve it?

  2. sql server - How do you count the number of occurrences of a …

    I have a column that has values formatted like a,b,c,d. Is there a way to count the number of commas in that value in T-SQL?

  3. sql - Query to get only numbers from a string - Stack Overflow

    CROSS APPLY ( --Step 2. --Use the column of numbers generated above --to tell substring which character to extract. SELECT SUBSTRING(@String, Number, 1) AS Character ) AS c ) --Step …

  4. How to extract this specific substring in SQL Server?

    Apr 22, 2012 · After specifying the field in the substring function, the second argument is the starting location of what you will extract. That is, where the ';' is + 1 (fourth position - the c), …

  5. sql - Extract string from a text after a keyword - Stack Overflow

    Oct 7, 2022 · I want to extract content from text in an SQL field after a keyword. I have a field called Description in a table, the content for that field is: asdasf keyword dog aeee keyword cat …

  6. sql - query for substring formation - Stack Overflow

    Jun 18, 2019 · RIGHT is only supported by SQL Server and MySQL. See my answer - there's no silver bullet for consistent substring function name & syntax across databases.

  7. Remove the last character in a string in T-SQL? - Stack Overflow

    How do I remove the last character in a string in T-SQL? For example: 'TEST STRING' to return: 'TEST STRIN'

  8. SQL SELECT WHERE field contains words - Stack Overflow

    Jan 12, 2013 · SELECT * FROM MyTable WHERE CHARINDEX('word1', Column1) > 0 AND CHARINDEX('word2', Column1) > 0 AND CHARINDEX('word3', Column1) > 0 Also, please …

  9. Split a string at a specific character in SQL - Stack Overflow

    It's detailed in Pattern matching as: The substring function with three parameters, substring (string from pattern for escape-character), provides extraction of a substring that matches an SQL …

  10. A SQL Query to select a string between two known strings

    58 I need a SQL query to get the value between two known strings (the returned value should start and end with these two strings). An example. "All I knew was that the dog had been very …