Go to Top

Tag Archives

Tag Archives: SQL and cognos


When doing a union query, is it better to use UNION ALL versus UNION? The UNION will try and eliminate duplicate rows between the two queries and essentially does a select distinct on the entire query. Most of the time when doing a union, users build the queries so that each query returns unique results and therefore they don’t need UNION. So, if you have a slow union query, try …Read More

Cognos Tech Tip: SQL Functions in Cognos

SQL Functions in Cognos If you have tried using certain SQL functions that you know should work but you get errors…you may have to modify your syntax slightly for Cognos. Example: dateadd(mm, 1, getdate()) Result in SQL Server Management Studio: Mar 16, 2015 12:19:27 PM Result in Cognos: Parsing error before or near position: 12 of: “dateadd(mm,” Solution: You must wrap the “mm” in curly brackets “{}” Working Query Calculation: …Read More