0
SELECT        BC_ID, Procedure_Description, Test_result, Normal_Values
FROM            tbl_BC
WHERE        (NOT (Test_result LIKE '@Test_result = %'))

Hello.

I want to filter all not null in Test_result row, but with the code above all records in the datagridview will hide.

1
  • If you only want to display all rows that are not null you can use where Test_result is not null Commented Apr 2, 2016 at 7:58

1 Answer 1

1

Your question is unclear, but I think you want to ensure that NULL values are not included in your results.

Use IS NOT NULL to filter NULL values in T-SQL:

SELECT
    BC_ID,
    Procedure_Description,
    Test_Result,
    Normal_Values
FROM
    tbl_BC
WHERE
    Test_Result NOT LIKE @Test_Result + '%'
    AND
    TestResult IS NOT NULL
Sign up to request clarification or add additional context in comments.

1 Comment

@JaphetCompendioBatucan Can you post some example input and desired output data in your original question? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.