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 |
|
gsgill76
Posting Yak Master
137 Posts |
Posted - 2012-02-06 : 11:44:14
|
Hi i want to convert ServiceTag Number into Express Service Code. the conversion i know in JavaScript as expresscode = parseInt(servicetag, 36).toString().split("");Can any one help me in converting this in SQL, may be SQL Function will be the bestRef : http://www.windowsitpro.com/article/jscript/getting-the-dell-express-service-codeThanksGurpreet Gill[url][/url][url][/url][url][/url][url][/url] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
gsgill76
Posting Yak Master
137 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-06 : 13:39:50
|
quote: Originally posted by gsgill76
quote: Originally posted by visakh16 see the below for sql split functionhttp://visakhm.blogspot.com/2010/02/parsing-delimited-string.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Sorry this is of no use for me :(
this does exactly what your js function does!ie it splits the input string based on delimiter ie in your case pacedidnt understand what else you're asking for??------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-06 : 13:48:16
|
| if you're looking for ParseInt part I think you need to write a udf for that------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
gsgill76
Posting Yak Master
137 Posts |
Posted - 2012-02-06 : 13:49:21
|
| Basically my JS code says that...Convert BASE36 to BASE10Rest is ok with me. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-06 : 14:02:52
|
| so what you want is function for that?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|