세 개의 필드 값 (세 개의 다른 열)이 null 인 경우 레코드 (행)를 숨기는 쿼리를 작성하는 가장 좋은 방법을 찾고 있습니다. 아래 코드는 3075의 구문 런타임 오류 메시지를 제공합니다. 또한 문제를 일으키는 지 확실하지 않지만 아래 코드는 기본 양식에서 실행되어 하위 양식 frmStaticDataSkills02에 영향을줍니다.
sql_get = "SELECT [tblCompetency02].[HighLevelObjective], [tblCompetency04].[Self], [tblCompetency04].[SelfSpecialLanguage], [tblCompetency04].[SelfChecklist], [tblCompetency04].[Team], [tblCompetency04].[TeamSpecialLanguage], [tblCompetency04].[TeamChecklist], [tblCompetency04].[Organisation], [tblCompetency04].[OrganisationSpecialLanguage], [tblCompetency04].[OrganisationChecklist], [tblCompetency02].[Competency] FROM [tblCompetency04] INNER JOIN [tblCompetency02] ON [tblCompetency04].[HighLevelObjective] = [tblCompetency02].[ID] WHERE ([tblcompetency04].[self]<>"" or [tblcompetency04].[team]<>"" or [tblcompetency04].[organisation]<>"")"
Form_frmStaticDataSkills02.Form.RecordSource = sql_get
세 열이 모두 NULL이 아닌 경우 데이터를 반환합니다.
where not (col1 is null and col2 is null and col3 is null)
논리 대수를 적용한 후에도 동일합니다. 세 행 중 하나라도 NULL이 아니면 행을 반환합니다.
where col1 is not null or col2 is not null or col3 is not null)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다