About 50 results
Open links in new tab
  1. sql - query for substring formation - Stack Overflow

    Jul 10, 2010 · 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. No built-in function in SQL Server for "substring to the end"?

    Sep 7, 2023 · Most implementations of substring support omitting the length argument, returning the substring from the nth position to the end of the string, but not SQL Server's, last time I checked. In …

  3. 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 FieldB and FieldC …

  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 examples I'm seeing are …

  5. Extracting a substring in SQL without knowing the position

    Oct 8, 2024 · It's better to do this while storing the data or on the client. This isn't easy, even with a regular expression- check this question that asks how to match after the Nth occurrence of a …

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

  7. sql - select where substring - Stack Overflow

    Sep 10, 2015 · SQL newbie here, but I can't find the solution to something that looks easy: The following query does not seem to have a valid syntax (ORA-00904: invalid identifier), but its logic should be …

  8. Select substring from a column in SQL - Stack Overflow

    Feb 5, 2015 · select count (value) as count from table 1 join table 2 on substring (value,20,10)=substring (code,0,10) where reference='1'. this will work for 2nd query, but it is not way to do it. You are …

  9. 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), because you …

  10. 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, 2 months ago Modified 4 years, 9 months ago Viewed 733k times