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 |
|
RobWafle
Starting Member
38 Posts |
Posted - 2001-12-31 : 17:28:09
|
| I had an interesting challenge recently, I realized I had garbage CUSIPs in my database.. I am new to programming in the financial world, and I could not find anything on the web to help me perform this function, so I wrote my own. And, since I think we should all share, I've posted it here!! Maybe someone can help me write it a little better too?If you have or have not heard of a CUSIP, look at:http://www.cusip.com/cusip/whats.htmlLook toward the bottom of the page, and you'll see some illustrations and expination of the "Check Digit".. Here is the code.. Its my first hack at writing both VB and SQL functions that check if a CUSIP is numeric.. (I have lots of extra output in the ASP version so it "shows" the calculations on the ASP page.. ) It will be stripped out in the real version.http://www.iliospartners.com/testCUSIP.asp (working program)http://www.iliospartners.com/testCUSIP.txt (ASP)http://www.iliospartners.com/testCUSIP.sql (SQL) |
|
|
RobWafle
Starting Member
38 Posts |
Posted - 2002-01-02 : 16:33:48
|
| wow.. guess not! ;) |
 |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2002-01-03 : 17:07:03
|
| Rob, thanks for sharing. If I were still working on NACHA inter-bank systems this would be very handy. You probably know that the ACH Transit-Routing Number has a check-digit validation routine similar to, but not as complex as, this one. I'll have to pass this on to some friends.--------------------------------------------------------------1000 Posts, Here I come! I wonder what my new title will be... |
 |
|
|
|
|
|