Aug 5, 2005 #1 Quempel MIS Jun 23, 2005 15 US I am looking for help on creating a query that will add a zero to an account number if it is less then 10 digits. Any help would be much appreciated. Thnx Q
I am looking for help on creating a query that will add a zero to an account number if it is less then 10 digits. Any help would be much appreciated. Thnx Q
Aug 5, 2005 #2 gol4 Technical User Apr 4, 2000 1,174 US =iif(len(account)>10,"0" & account,account) Upvote 0 Downvote
Aug 5, 2005 Thread starter #3 Quempel MIS Jun 23, 2005 15 US O.k....I guess maybe I should explain this a bit further... I am importing a csv file into a table. I want to make a query that will update the account # to 10 digits if it is less then 10. Upvote 0 Downvote
O.k....I guess maybe I should explain this a bit further... I am importing a csv file into a table. I want to make a query that will update the account # to 10 digits if it is less then 10.
Aug 5, 2005 #4 DotNetGnat Programmer Mar 10, 2005 5,548 IN something like this: Update yourTable SET AccountNumber = right('0000000000'+AccountNumber,10) -DNG Upvote 0 Downvote
Aug 5, 2005 #5 jebry Programmer Aug 6, 2001 3,006 US Hi! Try this: UPDATE YourTable SET YourTable.AccountNumber = Format([YourTable.AccountNumber],"0000000000"); hth Jeff Bridgham Purdue University Graduate School Data Analyst Upvote 0 Downvote
Hi! Try this: UPDATE YourTable SET YourTable.AccountNumber = Format([YourTable.AccountNumber],"0000000000"); hth Jeff Bridgham Purdue University Graduate School Data Analyst
Aug 5, 2005 Thread starter #6 Quempel MIS Jun 23, 2005 15 US Thank you...That worked. You have been very helpful. Upvote 0 Downvote
Aug 5, 2005 #7 DotNetGnat Programmer Mar 10, 2005 5,548 IN which method worked...just for future purposes... -DNG Upvote 0 Downvote
Aug 5, 2005 Thread starter #8 Quempel MIS Jun 23, 2005 15 US This is what I ended up using: Right('0000000000'+[Account],10) Thnx again Q Upvote 0 Downvote