|
|
-
Yusuf Bhiwandiwala Commented 7 Months ago through Blogs
@ravi,
+1 for trying a mathematical approach, but modulus 9 gives u sum of ([sum of ( ...n times]) until you arrive at a single digit final answer and that too when the original number is not a multiple of 9, in which case your ultimate sum if digits ...
|
-
Yusuf Bhiwandiwala Commented 9 Months ago through Blogs
declare @date datetime
set @date='20120118 19:22:10'
select cast(floor(cast(@date as float)) as datetime)...
|
-
Yusuf Bhiwandiwala Commented 9 Months ago through Blogs
Thanks Jeetendra, either that or what I originally intended (my bad):
DECLARE @i INT;
SET @i=798273;
WITH cteSumDigits AS
(
SELECT @i/10 AS i, @i%10 AS sum_of_digits
UNION ALL
SELECT ...
|
-
Yusuf Bhiwandiwala Liked 9 Months ago through Pages
We wish to use these pages for publishing various documents, announcements, FAQ etc related to beyondrelational.com...
|
-
Yusuf Bhiwandiwala Commented 9 Months ago through Blogs
Here's one using recursive CTE on SQL Server 2005+
DECLARE @i INT;
SET @i=798273;
WITH cteSumDigits AS
(
SELECT @i/10 AS i, @i%10 AS sum_of_digits
UNION ALL
SELECT i/10 as i, i%10 AS s...
|
-
Yusuf Bhiwandiwala Solved 2 Years ago through Puzzles
The solution entails:
1) First breaking down the text into sentences that are delimited by period ('.')
2) Then breaking these sentences into their constituent words that are separated by spaces
3) In the cte "CTE_WORDS", we do not actually get the indi
|
|
|