This "@" is to take the value from the user:
Code:
SELECT * FROM Patient WHERE Patient_Status LIKE @disease
it's working fine but to be a match...the user's inpout must be exactly=the text in the databse. what I have tried:
Code:
SELECT * FROM Patient WHERE Patient_Status LIKE '%' & @disease & '%'
the above statement error: The datatypes varchar and text are incompatible in the '' operator
Code:
SELECT * FROM Patient WHERE Patient_Status LIKE '%' & '@disease' & '%'
also error
Code:
SELECT * FROM Patient WHERE Patient_Status LIKE '%@disease%'
this is working, no errors, but it assumed the text to search for is "@disease"
Code:
SELECT * FROM Patient WHERE Patient_Status LIKE @%disease%
above statement error: error in WHERE clause near '%'
Bookmarks