About 287,000 results
Open links in new tab
  1. Convert a string to int using sql query - Stack Overflow

    Jan 10, 2013 · Definitely not the right answer for the original question since it was in relation to SQL Server 2005, but since it is 2019 and fewer folks are strapped to such an old version of …

  2. How to convert or cast int to string in SQL Server

    May 8, 2019 · To convert the type of the column you have to migrate the schema of this table. To convert the values in the cells of this column you have to migrate the data. Look into the …

  3. How do I convert (or cast) a String value to an Integer value?

    Aug 27, 2017 · Apache Spark's SQL has partial compatibility with Apache Hive. So, most SQL that can be written in Hive can be written in Spark SQL. Detail: To convert a STRING to a …

  4. sql - TSQL - Cast string to integer or return default value - Stack ...

    Feb 11, 2013 · As Joseph Mentions, users of SQL 2012+ should use TRY_CONVERT/TRY_CAST, which are explicitly intended to resolve the OP's question. This …

  5. SQL order string as number - Stack Overflow

    Aug 9, 2010 · Another way to convert. If you have string field, you can transform it or its numerical part the following way: add leading zeros to make all integer strings having equal length. …

  6. ORACLE - String to number - Stack Overflow

    Oct 25, 2012 · SELECT TO_NUMBER('123,456.78', '999,999.990') FROM DUAL; ...gives a result of 123456.78. (Tested in SQL*Plus and SQL Developer.) This shows that TO_NUMBER is just …

  7. sql - how to convert this String to Decimal - Stack Overflow

    Nov 15, 2017 · i have this String '5666,232343' and i want to convert it to Decimal, i use cast('5666,232343' as decimal(7,5)) but it returns NULL value. Do you know why it doesn't …

  8. How to convert a string to number in PL/SQL - Stack Overflow

    create or replace function is_int(p_str in varchar2) return number as begin if regexp_instr(p_str, '^[[:space:]]*[[:digit:]]{1,5}[[:space:]]*$') > 0 then return 1; end if; return 0; end; / show errors …

  9. sql - VARCHAR to DECIMAL - Stack Overflow

    Jun 19, 2012 · From MSDN: "Precision is the number of digits in a number. Scale is the number of digits to the right of the decimal point in a number. For example, the number 123.45 has a …

  10. How do I format a number with commas in T-SQL?

    Dec 7, 2010 · To strip the ".00" off the end of your number string, parsename is super-handy. It tokenizes period-delimited strings and returns the specified element, starting with the rightmost …

Refresh