Skip to content
Advertisement

Tag: loops

While loop SQL Server

Help me please. I need to write two functions, one that calculates the factorial and another that calculates the sums of euler. To make the euler sums I need to use the function that calculates the factory. I already have the function of factorial but when doing the sums the result I get “NULL” Note: it needs to be done

How to run SQL queries in a loop

How can I run this SQL query multiple times in a loop, where I replace the word ‘pubs’ with another word during each iteration. Is there a way to store an array of strings and loop through them? Answer In general, it’s usually better performance-wise to do bulk or batch queries than queries in a loop, since you can save

sql while loop with date counter

I need to do something like this in sql: How can I do the above correctly in SQL? Basically, my startdate and enddate are strings and not datetimes because my business logic is referencing string column in another table with a date as the name of the column-But I need to loop through a bunch of columns, each column having

Advertisement