Home Page link  

Auto Generated Customer Account Number

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here 

get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Auto Generated Customer Account Number Chris 04-14-2006
Posted by Chris on April 14, 2006, 10:30 am
Please log in for more thread options
I appreciate that RMS is optomistically perset so that we can will someday
need 7 digit account numbers, but for now five digits would do. I have tried
in configuration to change the next auto generated account number to a five
digit number but when I leave the field or click OK two leading 00's are
added to it. Am I missing something?



Posted by Ken K on April 15, 2006, 11:26 am
Please log in for more thread options
Hi Chris,

The first SQL script below will drop the leading two zeroes from existing
account numbers. Make a backup before you execute it.

The second will create a trigger which drops the two zeroes for new
customers. Run them one at a time.

Ken Kosnik
Computer Analytics Corporation


UPDATE customer
SET accountNumber = RIGHT(RTRIM(accountNumber),5)
WHERE LEN(RTRIM(accountNumber)) = 7
AND LEFT(accountNumber,2) = '00'



CREATE TRIGGER [tr_Force_5digit_accountNumber] ON [dbo].[Customer]
FOR INSERT AS
UPDATE customer
SET accountNumber = RIGHT(RTRIM(accountNumber),5)
WHERE LEN(RTRIM(accountNumber)) = 7
AND LEFT(accountNumber,2) = '00'
AND id IN (SELECT id FROM inserted )





>I appreciate that RMS is optomistically perset so that we can will someday
>need 7 digit account numbers, but for now five digits would do. I have
>tried in configuration to change the next auto generated account number to
>a five digit number but when I leave the field or click OK two leading 00's
>are added to it. Am I missing something?
>



Similar ThreadsPosted
Service pack problems with auto-generated account code June 14, 2005, 9:07 am
RE: Auto generated item lookup codes and customer numbers March 27, 2007, 7:01 pm
RE: Auto generated item lookup codes and customer numbers March 27, 2007, 7:52 pm
Auto generated item lookup codes and customer numbers March 27, 2007, 9:53 pm
Global Customer Account Number September 5, 2005, 2:57 pm
Barcode Customer Account Number April 3, 2006, 11:10 am
How do i get the customer account number? VB6 Com addin July 19, 2006, 7:07 am
Alias to customer account number? December 4, 2007, 9:13 am
Customer account number bar code labels March 27, 2006, 8:18 pm
Changing the Global Customer Account Number through SQL December 13, 2006, 4:10 pm

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap