查询以搜索带图像的项目

发布于 2025-01-14 19:11:22 字数 524 浏览 3 评论 0原文

我正在寻找一个查询来查找具有图像的项目。

(status != 'OBSOLETE' and itemsetid = 'ITEMSET1') and (exists (select 1 from dbo.inventory where ((location = 'SPARES')) and (itemnum=item.itemnum and itemsetid = item.itemsetid))) and (itemnum in (select imglib.refobjectid from IMGLIB where refobject='ITEM'))

添加时,一切都与例外完美配合:

itemnum in (select imglib.refobjectid from IMGLIB where refobject='ITEM')

我无法访问数据库,因此我无法检查 IMGLIB 表的内容,但据我所知,这应该可以工作? refobjectid是存储的itemnum?

我缺少什么?

I am looking for a query to look for items that have a image.

(status != 'OBSOLETE' and itemsetid = 'ITEMSET1') and (exists (select 1 from dbo.inventory where ((location = 'SPARES')) and (itemnum=item.itemnum and itemsetid = item.itemsetid))) and (itemnum in (select imglib.refobjectid from IMGLIB where refobject='ITEM'))

everything works perfectly with the exeption when adding:

itemnum in (select imglib.refobjectid from IMGLIB where refobject='ITEM')

I can't reach the db so i can't check the contents of the IMGLIB table but AFAIK this should work?
refobjectid is the stored itemnum?

What am i missing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橙味迷妹 2025-01-21 19:11:22

查看 Maximo 版本 7.6.0.3 实体关系时文档 (ERD):(

部分)IMGLIB 的 MAXIMO INCOMING RELATIONSHIPS

名称来源备注
IMGLIBITEM与IMGLIB 表,用于查找给定项目的图像。 (imglib.refobject='ITEM' 和 imglib.refobjectid=:item$ITEM.ITEMID)。结果集将包含零个或一个对象。

我认为你需要 ITEMID,而不是 ITEMNUM

(但我不了解 MAXIMO ...)

When looking at Maximo version 7.6.0.3 Entity Relationship Document (ERD):

(part of) MAXIMO INCOMING RELATIONSHIPS for IMGLIB

NamesourceRemarks
IMGLIBITEMRelationship to the IMGLIB table, used to find the image for a given item. (imglib.refobject='ITEM' and imglib.refobjectid=:item$ITEM.ITEMID). The resulting set will contain zero or one object.

I think you need ITEMID, and not ITEMNUM

(But I do not have knowledge of MAXIMO ... )

┈┾☆殇 2025-01-21 19:11:22

您的查询应如下所示:

   itemid in (
      select refobjectid from imglib where refobject='ITEM'
   )

Your query should look something like this:

   itemid in (
      select refobjectid from imglib where refobject='ITEM'
   )
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文