Note: I am not a CS grad nor am I trained formally in SQL. I'm self taught primarily for query-only.
I don't understand looping in SQL. Or rather, I don't understand what I think looping is when someone says it to me. As I understand, SQL is declarative, and while apparently there are LOOP commands I'm not actually interested in those.
At work, we use IBM Cognos 10 to query a database. Cognos 10 generates SQL which is then sent to the database and data is retrieved. So, as I interpret it, SQL is the "real" query tool, with Cognos just driving it.
There's some concern that the way Cognos generates the SQL, that more complex queries with multiple queries and sub-queries may actually create some kind of looping, generating incorrect data. Cognos has a "Framework Manger" that allows the admin to specify joins between tables. Often these joins are not set up in a way that meets the required need, so I can actually create joins by making smaller queries in Cognos and joining them together in Cognos.
But Cognos ultimately has to interpret these queries and script up some SQL to send to the database. So assuming it is doing its job correctly how could there be looping? Or am I just talking nonsense?
I don't understand looping in SQL. Or rather, I don't understand what I think looping is when someone says it to me. As I understand, SQL is declarative, and while apparently there are LOOP commands I'm not actually interested in those.
At work, we use IBM Cognos 10 to query a database. Cognos 10 generates SQL which is then sent to the database and data is retrieved. So, as I interpret it, SQL is the "real" query tool, with Cognos just driving it.
There's some concern that the way Cognos generates the SQL, that more complex queries with multiple queries and sub-queries may actually create some kind of looping, generating incorrect data. Cognos has a "Framework Manger" that allows the admin to specify joins between tables. Often these joins are not set up in a way that meets the required need, so I can actually create joins by making smaller queries in Cognos and joining them together in Cognos.
But Cognos ultimately has to interpret these queries and script up some SQL to send to the database. So assuming it is doing its job correctly how could there be looping? Or am I just talking nonsense?