none
Data Type Conversion to integer RRS feed

  • Question

  • Hi i tried to convert a column which has column like this K00786516 so i did took off k from it like

    right (column,9) so it gave me 00786516 now when i tried to conver to integer or big int using data conversion task the output was

    786516 i was missing 00 in the front any sugesstions please

    Thank you


    Sri.Tummala
    Monday, January 30, 2012 5:32 PM

Answers

  • It did what you wanted, converted it to an integer.  Leading zeros for any numeric are ignored.

    If you need to keep the leading zeros, you can keep this as a string, and just remove the first letter.


    Russel Loski, MCITP Business Intelligence Developer and Database Developer 2008
    • Marked as answer by kali786 Tuesday, January 31, 2012 9:17 AM
    Monday, January 30, 2012 5:43 PM

All replies

  • It did what you wanted, converted it to an integer.  Leading zeros for any numeric are ignored.

    If you need to keep the leading zeros, you can keep this as a string, and just remove the first letter.


    Russel Loski, MCITP Business Intelligence Developer and Database Developer 2008
    • Marked as answer by kali786 Tuesday, January 31, 2012 9:17 AM
    Monday, January 30, 2012 5:43 PM
  • Yah you are right I can create a new measure take the count of these fields and insert them as a fact thanks for your reply
    Sri.Tummala
    Tuesday, January 31, 2012 9:18 AM