[英]Netsuite: Saved Search Formula : Show Distinct Line with Earliest Custom Date
I'm trying to get a saved search to only show one of each item.我正在尝试保存搜索以仅显示每个项目中的一项。 I do not want duplicates of the same item on this search.
我不想在此搜索中重复相同的项目。 I only want the item with the earliest "Due @ Dest" field to be on there.
我只希望有最早的“Due @ Dest”字段的项目出现在那里。
This search show all items that are out of stock and what PO# (containers) are coming in, along with what items and what date they are arriving.此搜索显示所有缺货的物品和进来的 PO#(容器),以及它们到达的日期和物品。 In the image below I would like it to not display the 1st, 3rd, 5th and 7th line because these items are already on the search with a more recent date.
在下图中,我希望它不显示第 1、3、5 和 7 行,因为这些项目已经在搜索中,并且日期较新。
Apologies if this sounds confusing, let me know if there is anything I can make clearer.抱歉,如果这听起来令人困惑,请告诉我是否有任何可以更清楚的地方。 I imagine i would need a custom formula.
我想我需要一个自定义公式。 Any idea where to start?
知道从哪里开始吗?
- Brandon - 布兰登
You can filter so you only get one row per item:您可以进行过滤,以便每个项目仅获得一行:
select t.*
from t
where t.due_at_dest = (select min(t2.due_at_dest)
from t t2
where t2.item = t.item
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.