가 나는 등의 데이터 가져 오기 위해 SQL 쿼리 쓰고 싶다 SQL의 조건 :부울 절
1. when param = 'all' it should list data across the table
2. when param = 'yes' it should list data where invoicenumber is not empty.
3. when param = 'no' it should list data where invoicenumber is empty.
내가 예에 대한 쿼리 아래 시도
을 더
declare @invoiced as nvarchar(10) = 'no'
select * from OrderSummary
where
((@invoiced = 'yes') or (InvoiceNumber = ''))
and
((@invoiced = 'no') or (InvoiceNumber <> ''))
는 지금은 모든 통합 싶지 조건, 아무도 내가
위 검색어로이 검색어를 업데이트하십시오. –