CodePudding user response:
Put the or cache unionSELECT * FROM WHERE A LIKE '% %' OR A LIKE '% ABC %'
Switch to
SELECT * FROM WHERE A LIKE '% %'
The UNION
SELECT * FROM WHERE A LIKE '% ABC %'
CodePudding user response:
Change the or to the unionSELECT * FROM WHERE A LIKE '% %' OR A LIKE '% ABC %'
Switch to
SELECT * FROM WHERE A LIKE '% %'
The UNION
SELECT * FROM WHERE A LIKE '% ABC %'
CodePudding user response:
Are there any other way, I tried to useCodePudding user response:
A LIKE '% %' OR A LIKE '% ABC %'Switch to
A LIKE '%' | | TRIM (' ') | | '%' OR A LIKE '% ABC %'
Change space into the air
CodePudding user response:
It is found out, but still query the allCodePudding user response:
Take out your statements and have a lookCodePudding user response:
Bring out your statements to see, don't pictures, to code,CodePudding user response:
SELECT * FROM(
The SELECT EPM_CODE EPM_NAME, T_ID_EDI_AFSYS_MAP. *
The FROM T_ID_EDI_PARTNER_MASTER, T_ID_EDI_AFSYS_MAP
WHERE EPM_KEY=EAM_PARTNER
AND EPM_CODE IN (
'SHA - TALLY'
)
AND EAM_TYPE IN
(
'CONTAINER'
)
AND EPM_FILTER_3 IN
(
'CNYCC $SHA', 'CNHMS $SHA'
)
UNION ALL
The SELECT EPM_CODE EPM_NAME, T_ID_EDI_AFSYS_MAP. *
The FROM T_ID_EDI_PARTNER_MASTER, T_ID_EDI_AFSYS_MAP
WHERE EPM_KEY=EAM_PARTNER
AND EPM_CODE IN (' SSE,
'the SSE - SIN'
'the SSE - TW,
'the SSE - UK'
)
AND EAM_TYPE IN
(
'LOCATION'
'CHARGEID'
)
AND EPM_FILTER_3 IN
(
'CNYCC $SHA', 'CNHMS $SHA'
)
) A
Where EPM_Name like '% %' OR EAM_TYPE like '% %'