将报告从COGNOS迁移到SQL Server

编程入门 行业动态 更新时间:2024-10-25 22:35:14
本文介绍了将报告从COGNOS迁移到SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在Cognos报表中生成了以下查询。

I have the following query generated in a Cognos report.

我的问题是我需要它运行,并且在SQL Server中具有相同的逻辑/过滤器。可以生成下面的过滤器(COGNOS语法)以相同的方式工作,例如SQL Server中的 WHERE 吗?

My problem is I need it to work, with the same logic / filter in SQL Server. Can the filter below (COGNOS syntax) be generated to work in the same way, like a WHERE in SQL Server?

select * from dbo.ia_code group by client__iacode.ia_code, client__iacode.ia_short_descr ------ here my problem filter (rank() over ( at client__iacode.ia_code order by XCOUNT(client.client_code at client__iacode.ia_code,client.client_id for client__iacode.ia_code ) desc nulls last) <= 25) and (RCOUNT(rank() over ( at client__iacode.ia_code order by XCOUNT(client_document.client_document_id for client__iacode.ia_code ) desc nulls last) at client__iacode.ia_code order by rank() over ( at client__iacode.ia_code order by XCOUNT(client_document.client_document_id for client__iacode.ia_code ) desc nulls last) asc,client__iacode.ia_code asc,client__iacode.ia_short_descr asc ) <= 25)

任何帮助将不胜感激。

推荐答案

首先尝试更改查询(或数据源)的汇总处理;属性数据库。这应该有助于将扩展的聚合函数(XCOUNT等)转换为本机SQL。还要检查使用SQL参数属性并将其设置为文字并查看这是否有助于使用本机SQL中的参数。完成这些操作后,在此处粘贴新生成的 native 查询。

First try changing the query's (or data source's) "Rollup Processing" property to "Database". That should help converting extended aggregate functions (XCOUNT etc) to native SQL. Also check out "Use SQL parameters" property and set it to "Literal" and see if that will helps with the parameters in native SQL. Once you do those, paste the new generated native query here.

属性窗口的屏幕截图

这是我对以下Stackoverflow问题的回答的摘要。在该处阅读更多详细信息,并关注该问题,因为它也可能对您的问题有所帮助。

This is a snippet from my answer to the following Stackoverflow question. Read more details there and also follow that question as it may help with your question too.

将包含过滤器的IBM Cognos SQL转换为Microsoft SQL Server查询

更多推荐

将报告从COGNOS迁移到SQL Server

本文发布于:2023-10-16 10:18:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497290.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报告   COGNOS   Server   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!