---Fibonacci numbers
declare @fib table(fib_id bigint,fib_val bigint)
declare @current_val bigint,@previous_val bigint,@new_val bigint
insert into @fib(fib_id,fib_val)
select top 30 row_number() over (order by name),1 from sysobjects
select @current_val=0,@previous_val=-1,@new_val=1
update @fib
set fib_val=@current_val,
@current_val=@new_val+@previous_val,
@previous_val=@new_val,
@new_val=@current_val
select * from @fib
Happy Coding!!!!!!
Subscribe to:
Post Comments (Atom)
Search This Blog
DAX - Grouping on multiple columns and the count
Please go thorugh the below URL for entire soultion. http://community.powerbi.com/t5/Desktop/DAX-Grouping-on-multiple-columns-and-the-cou...
-
We can filter an axis based on the members, or based on the measure value. Based on the members: begins with F or after Based on th...
-
By default, NOCOUNT is set to OFF and it returns number of records got affected whenever the command is getting executed. If the user doesn...
-
The APPLY operator allows you to join two table expressions; the right table expression is processed every time for each row from the left ...
No comments:
Post a Comment