Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sanemetz
Starting Member
1 Post |
Posted - 2007-07-12 : 16:04:29
|
I need to perform some formatting using a mask in SQL. Does anyone know how I can do this?I have developed an application that needs to have a system generated numbering sequence. However, the number sequence needs to be within a user-defined mask.For example, the application automatically increments a call number when a new call is has been entered and saved in the application. The call number, however, needs to be formatted in a user-defined mask. An example of the mask would be YYYY-MM-00000 where the YYYY is the four digit year, and MM is the two digit month and the 00000 is the actual call number. The mask, again is user definable, so a user could set it up as 0000-YY-MM-DD or something of this nature.Is there a way to have a SQL stored procedure format the call number? I have a table called seq_num that contains a field called "Format_Mask" and a field called "Next_Num".Any help would be great.Thanks,Scott |
|
|
|
|