Add a "0" to the Beginning of String
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello -- I have NCPDP numbers where some begin with 0 and are 7 characters. I want to change the data after the fact (takes me over 6 hours to run this script) to include the 0 in front when it gets removed and the NCPDP is only 6 numbers in a string. In excel, this is a simple formula of =TEXT([@NCPDP],"0000000"). So, the output will always be 7 characters but where there is a 0, it will be included instead of blank and the string only being 6 characters. I need to join this later to other strings that already include the 0. So an NCPDP # of 430495 should read 0430495 as a string.
I can't figure out how to do this in Alteryx using the Formula tool. I do not want to have to rerun this script again and add the Select tool to change to string before it is saved to yxdb file. I have over 14 million rows. Any help is appreciated.
--Russ
Solved! Go to Solution.
- Labels:
- Datasets
- Interface Tools
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MarqueeCrew Thanks sir. I actually just figured it out myself.
