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 |
davidc
Starting Member
26 Posts |
Posted - 2007-05-09 : 06:40:39
|
I need to take a numeric value and add together the cubes of each single digit. The string length may vary from row to row.As as example the number 1234 has individual cube values of 1 (1 cubed), 8 (2 cubed), 27 (3 cubed) and 64 (4 cubed). The resulting sum of the cubes is then 1+8+27+64 = 100. The same result would occur for 1243.The purpose is to look for numeric values in a table where the same digits occur in two different rows but in a different order.How can I create a function to apply to a varchar column to produce my integer result ? |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-05-09 : 06:41:56
|
This forum is not for posting questions. Please post your question in appropriate forum.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-28 : 08:38:54
|
moved from script library_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
|
|
|
|
|