My SQL server database contains employee serial numbers stored as a character (string) field although all serial numbers are numeric. When making sales, employees are allowed to enter their serial number with a leading zero or without a leading zero. Most employees use only one or the other format exclusively. Some employees, however, use both formats. When the leading zero is present, the serial number contains five characters (e.g. 01234). When the leading zero is not present, the serial number contains four characters (e.g. 1234).
I have successfully created a cross tab (Crystal 8.5) that displays units sold of three different product types by employee serial number in descending order by total units sold using the TopN function. The problem is that those employees who have recorded units sold using both serial number formats show up in different parts of the report due to the sort order.
What I want to do is treat the 01234 serial number the same as the 1234 serial number for sorting purposes. I would settle for simply showing the sales results for 01234 and 1234 as two separate lines one on top of the other. Retention of the zero is not critical.
There are approximately 1,200 total serial numbers of which maybe 10 percent are affected by the dual format. Any suggestions other than doing away with the person who made the decision to allow both methods of serial number entry?
Many thanks in advance...
Rooski
I have successfully created a cross tab (Crystal 8.5) that displays units sold of three different product types by employee serial number in descending order by total units sold using the TopN function. The problem is that those employees who have recorded units sold using both serial number formats show up in different parts of the report due to the sort order.
What I want to do is treat the 01234 serial number the same as the 1234 serial number for sorting purposes. I would settle for simply showing the sales results for 01234 and 1234 as two separate lines one on top of the other. Retention of the zero is not critical.
There are approximately 1,200 total serial numbers of which maybe 10 percent are affected by the dual format. Any suggestions other than doing away with the person who made the decision to allow both methods of serial number entry?
Many thanks in advance...
Rooski