---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...
-
Incremental Uploads: We have got a request to need a SSIS package to incremental uploads between two sql server instances which are two d...
-
Follow the below link https://blogs.msdn.microsoft.com/arvindsh/2013/04/23/cannot-resolve-the-collation-conflict-error-message-with-tem...
No comments:
Post a Comment