About 45,600 results
Open links in new tab
  1. 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.

  2. 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), …

  3. 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?

  4. sql - How can I tell if a VARCHAR variable contains a substring ...

    IF CONTAINS(@stringVar, 'thisstring') ... I have to run one select or another, depending on whether that variable contains a string and I can't figure out how to get it to work. All the …

  5. 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 …

  6. sql - Split string and take last element - Stack Overflow

    Standard STRING_SPLIT does not allow to take last value. The trick is to reverse the string (REVERSE) before splitting with STRING_SPLIT, get the first value from the end (TOP 1 …

  7. How to Select a substring in Oracle SQL up to a specific character ...

    How to Select a substring in Oracle SQL up to a specific character? Asked 15 years ago Modified 4 years, 7 months ago Viewed 732k times

  8. 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?

  9. SELECT Statement with substr in WHERE Clause - Stack Overflow

    124NNN333 NNN Jenny 232XPT124 XPT Jade 456XXX345 XXX James FieldA has a fixedlength of 9. I didn't design this table and some applications are already using it. I want to select …

  10. 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 …