COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: FLPylot on 08 Jun 2016 01:39:46 PM

Title: Equivalent "For Each" command in Cognos
Post by: FLPylot on 08 Jun 2016 01:39:46 PM
What is the Cognos equivalent to the SQL Server FOR EACH Loop command?
Title: Re: Equivalent "For Each" command in Cognos
Post by: bdbits on 08 Jun 2016 03:21:19 PM
As far as I am aware, Microsoft SQL Server does not have a FOR EACH control flow statement. What are you trying to do?

If you have procedural code, you should put it in the database as a stored procedure. You can call that from Cognos.

But databases are built for set-oriented operations. Most of the time, you should be able to get what you want without resorting to stored procedures.