I have the following query that produces correct results however since UnRegMale or UnRegFemale may be bracketed in which case I need to select that field as '' in the query. Bracketed names in the table are not competitors but support persons whose names should not be visible. Is this possible in this query. Something similar to the use of ISNULL(x,'')
SELECT LTRIM(REPLACE(REPLACE(H.PtsNonMale,'.',' '),' ',' ')) AS UnRegMale, LTRIM(REPLACE(REPLACE(H.PtsNonFemale,'.',' '),' ',' ')) AS UnRegFemale, C.Comp_Name As Competition, convert(int, YEAR(C.Comp_Date),103) As [Comp Date], E.EvtDesc As Section, H.PtsPlaced as Placed
FROM tblPtsPerCompHistory H
LEFT JOIN tblEvtStructure E ON E.EvtStruct_Idx = H.PtsStructID
LEFT JOIN tblCompetitions C ON H.PtsCompID = C.Competition_Idx
WHERE H.PtsMale = 0 And H.PtsFemale = 0 And ISNULL(H.PtsNonMale,0) <> '0' And H.PtsNonMale <> '' And ISNULL(H.PtsNonFemale,0) <> '0' And H.PtsNonFemale <>''
ORDER BY LTRIM(H.PtsNonMale), LTRIM(H.PtsNonFemale), C.Comp_Date DESC