本文介绍了需要sql来压缩请求并添加和/或语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 在sql中每个pt_type可以有几行不同的信息,每行都有不同的pt_reference 所以单词1和2可能在同一行,但是单词3可能在一行中不同的行但具有相同的d_id,但如果所有3个值都匹配,那么我想知道唯一的d_id。对于每个独特的匹配结果。 在下面的情况下,将显示1941和2991 是否也有一个和/或excel语句的类型?我在下面的查询中注意到我需要它。 谢谢 id d_id pt_type pt_ref pt_value 3278764 69765 11 999 J0SB 4658482 67811 11 8 screen 2892238 47499 0 1 CRL Custom Finish P7 Series 36"末端接头旋转接头栏杆套件 4069940 1941 11 4这个 2793773 8756 0 1 CRL黑色压铸滑动门拉门2-3 / 8螺丝孔 2892239 47500 0 1 CRL Custom Finish P7 Series 36"角柱旋转接头栏杆套件 4161303 14657 11 1交易 4176252 29539 11 2栏杆 4184049 1941 11 9 4188079 33720 11 3栏杆 2762021 1941 0 1 theother 2762022 34055 1 1 C1DP42BRZ_34055.gif 3254121 3236 5 1面直径:: 2英寸(50.8毫米) 5001800 31146 16 1 CRL Abrazadera de manguitoapresiónparacristal,90 grados,en cobre cepillado antiguo 2762024 2991 1 2这是一个测试 4191045 2991 11 2那是两个 2794393 2991 1 1另一个 展开 | 选择 | Wrap | 行号 解决方案 in sql each pt_type can several different lines of information, each with a different pt_reference so word 1 and 2 might be in the same row, but word 3 might be in a different row but have the same "d_id", but if all 3 values are matched, then I want to know the unique "d_id" for each unique matching result. in the case below, 1941 and 2991 would be displayed is it also to have an and/or type of excel statement? I noted in the query below where I need it. THANK YOU id d_idpt_type pt_refpt_value32787646976511999J0SB 465848267811118screen28922384749901CRL Custom Finish P7 Series 36" End Post Swivel Fitting Railing Kit40699401941114this2793773875601CRL Black Die Cast Sliding Screen Door Pull With 2-3/8" Screw Holes28922394750001CRL Custom Finish P7 Series 36" Corner Post Swivel Fitting Railing Kit416130314657111TRANSACTION417625229539112railing41840491941119that418807933720113railing2762021194101theother27620223405511C1DP42BRZ_34055.gif3254121323651Face Diameter::2 in (50.8 mm)500180031146161CRL Abrazadera de manguito a presión para cristal, 90 grados, en cobre cepillado antiguo2762024299112this is a test41910452991112and that is two2794393299111other one Expand|Select|Wrap|Line Numbers 解决方案 这篇关于需要sql来压缩请求并添加和/或语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 20:42