Inner join FLLLDMX u1 on v1. DJBH=u1. DJBH
Inner join GONGCHANG t1 on v1. The DM1=t1. GHSDM
Inner join RKLX t4 on v1. DM4=t4. LXDM
Inner join fuLIAO t6 on u1. FLDM=t6. FLDM
Inner join FFJSX t2 on t6. HJSX1=t2. SXDM and t2. SXDM='1001' and t2. SXMC='VL'
Inner join SHANGPIN t5 on v1. SPDM=t5. SPDM where v1. RQ>
='2019-11-1'Group by v1. RQ, v1 DJBH, t1. GCDM, t1. GCMC, t2. SXDM, t2. SXMC, u1. SPDM, t4. LXDM, t4. LXMC, t5. SPDM, t5. SPMC
And t2. SXDM='1001' and t2. SXMC='VL' these two conditions query data is correct, if I have need of t2. The query condition SXDM='1003' and t2. SXMC='vitamin c', what to write,
And t2. SXDM in (' 1001 ', '1003') and t2. SXMC (' VL ', 'vitamin c') in this also not line, documents in only one line of data query will have the same two documents
CodePudding user response:
(t2) SXDM='1001' and t2) SXMC='VL') or (t2) SXDM='1003' and t2) SXMC='vitamin c')
CodePudding user response:
If the query results in the same line, that requires attention, the problem is not on the query conditions, and on the Join condition, the Join condition is not the only?CodePudding user response:
If the same two lines, then a distinctCodePudding user response: