About 50 results
Open links in new tab
  1. DB2 SQL Convert Decimal to Character with Padded Zeros

    Mar 20, 2013 · Only use the DIGITS function, because this verifies the length of the field numeric or decimal, etc and completes with zeros to the left when is necessary.

  2. db2 - SQL query for first digits of a numeric field - Stack Overflow

    Sep 26, 2014 · I have a NUMERIC(5, 0) field in a IBM db2 database from which I only want the first 4 digit. I haven't been able to achieve what I want with using CAST. How can I achieve this in SQL …

  3. DB2- How to check if varchar field value has integers

    May 7, 2012 · Is there an inbuilt DB2 function or any query to check if the character i have is a number? (I cannot use user defined functions)

  4. db2 - I need to Mask to view only last 4 digits - Stack Overflow

    Jun 4, 2020 · using cobol and db2 please help me to check length of query retrieved data and mask accordingly to display last 4 digits As an example if the real account number is 123456789. Then it …

  5. db2 - Extract digits from character field in SQL - Stack Overflow

    Extract digits from character field in SQL Asked 10 years, 1 month ago Modified 9 years, 3 months ago Viewed 2k times

  6. sql - Get 2 Digit Number For The Month - Stack Overflow

    Feb 20, 2013 · I have an integer column "Month" I would like to get 2 digit number for month. This is what I have tried: DATEPART(mm, @Date) It returns one digit for months January to September I …

  7. How can I find a number in a string in DB2 SQL - Super User

    Apr 5, 2019 · I need to find a number in a string in DB2 SQL, and I have the position of the first number. Can anybody help me please?

  8. sql - DB2 Convert Number to Date - Stack Overflow

    Dec 22, 2017 · DB2 Convert Number to Date Asked 8 years ago Modified 2 years, 10 months ago Viewed 52k times

  9. DB2 query where first two digits of column are numeric

    Oct 27, 2014 · I'm not sure how to go about doing this in db2. I need all the rows where part number is '456' and the first two characters of location are numeric and also the rows that start with 'MR'

  10. Convert DB2 SQL Decimal to time - Stack Overflow

    Jun 28, 2018 · cast is there just to simulate 6 digit decimal digits converts decimal to char, padding it with zeros to_date converts string to timestamp, based on the format string. TIMESTAMP_FORMAT …