About 59,000 results
Open links in new tab
  1. sql - Can we use a CASE...WHEN inside SUBSTRING ... - Stack …

    May 29, 2014 · (Here's a much simpler case of my actual conundrum at work) Let's say I have a table, called 'a', with a column named 'col' with the following values (say a column of length 2 …

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

    Mar 9, 2012 · Using this sql statement: SELECT FieldB, FieldC FROM TableA WHERE FieldA LIKE Concat(@paramA, '%', @paramB) I cannot achieve my desired result. When I try to …

  3. sql - Setting variable to substring of itself for query - Stack Overflow

    Mar 10, 2017 · SQL Server - Use substring in where clause. 0. Get Substring and Use it In Where Clause. Hot Network ...

  4. sql - How to join two tables based on substring values of fields ...

    Feb 21, 2015 · The character position is wrong. You should start your substring on the position 2 (the first character of your string is 1 and not 0). On the other side, you are using the SUBSTR …

  5. SQL Server: How to group by substring - Stack Overflow

    Dec 2, 2013 · I have the following stored procedure to fetch data from a table. The table has a column "region" that contains value like "APAC: China" etc. for which I am using the substring …

  6. how to use substring and concat operation together

    Nov 10, 2017 · Off the top of my head, it looks as though you might have been trying to alias the substring call with GIVEN_NAME. In any case, you would not need any aliases in your select …

  7. sql - Substring in Where clause - Stack Overflow

    Aug 21, 2013 · Use the ISNUMERIC() function to determine if SUBSTRING(loandescription,1,4) is actually a number. If it is, then you can cast/convert it at that point and compare it to the …

  8. Performance of SUBSTRING vs LEFT in SQL Server

    Aug 26, 2017 · SQL Server is a database. You dod not ask questions of which string processing function is 'faster'. You ask the questions 'which can use an index?' and 'do I have the required …

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

    Feb 2, 2011 · Selecting Substring SQL. 0. How to extract the specific substrings from a single string? 0.

  10. SQL: how to select a substring between special characters

    Then the substring returns the part of your string starting from the 3rd character (again, skipping the first two slashes), and continuing until just before the next slash, as determined by charindex.