【CQ】如何查询duplicate类型的上下游数据
来源:互联网 发布:爱宝价签软件 编辑:程序博客网 时间:2024/04/29 18:29
转载自IBM网站,有时候会用到
先是SQL查询的:
To create a query which returns Duplicate parent and child information in the result set:
- Create a new query.
- Select the ID field to display and select no filter fields. Run the query.
- Select the 'SQL editor' tab next to the 'Display editor' tab.
Note: If you cannot see the 'SQL editor' tab, select View > View SQL pane from the menu. Then the SQL editor tab will become available. - Make a change to the SQL command in the SQL editor tab. You will be prompted to confirm to continue.
- Select Yes and the SQL command will become editable.
- Replace the SQL command in the tab with the following SQL command using 'Ctrl + V' to paste it.
- To show all the records in duplicate state and include their parent IDs in the result set:
select distinct T1.dbid, T1.id, T2.id as "Duplicate Of"
from Defect T1, Defect T2, parent_child_links l
where T1.dbid <> 0 and (T1.dbid = l.child_dbid
and l.parent_dbid = T2.dbid and l.link_type_enum=2) - To show all the records which have duplicate records and include their duplicate IDs in the result set :
select distinct T1.dbid, T1.id, T2.id as "Duplicates"
from Defect T1, Defect T2, parent_child_links l
where T1.dbid <> 0 and (l.parent_dbid = T1.dbid
and l.child_dbid = T2.dbid and l.link_type_enum=2)
- To show all the records in duplicate state and include their parent IDs in the result set:
- Run the Query
程序方法获取,提供方法,可自己查看api说明
GetOriginal 获取父记录对象
GetOriginalID 获取父记录ID
GetDuplicates 获取子记录集合
IsOriginal 是否父记录类型
IsDuplicate 是否子记录类型
- 【CQ】如何查询duplicate类型的上下游数据
- 鞍钢对于钢铁业上、下游的分析(上)
- 什么是上、下游产业
- ASP中如何查询日期类型的数据
- 如何在Oracle中查询Date类型字段的数据
- 上游单据与下游单据的类型要一致
- cq中添加单独的类型,修改和删除
- 鞍钢对于钢铁业上、下游的分析(下)
- 简单类型的数据查询
- 检索系统的下游管理
- 检索系统的下游管理
- CQ数据库的还原
- 关于在sql上查询blob类型数据的操作要点
- 上下游依赖 这种er关系 在mysql 等关系型数据库中 如何设计 存储
- 如何把数据库中的String类型的数据在jsp页面上转化为date类型的数据
- CQ的记录类型的关联动作之间的脚本执行情况
- 技巧 改变实体性质(增加一个类型字段) , 增加一种关系 考虑上游下游的影响
- c++如何查询变量的类型
- 命名空间“Microsoft”中不存在类型或命名空间名称“Office”(是缺少程序集引用吗?)
- 学习Oracle前为什么要学Linux
- Winsock Programmer’s FAQ
- Linux 使用ftp命令进行远程文件传输
- visual studio集成lua,语法高亮
- 【CQ】如何查询duplicate类型的上下游数据
- SQL2005 XML数据处理
- 设计Task Form的注意事项
- Data Pump的体系结构
- 抽象【情诗】【转】
- 自定义控件Checkbox添加ReadOnly 属性
- 基础类型和byte[]之间的转换
- maven deploy 遇到的问题
- IOS开发-起航