sql - c# - using % as a text symbol(percent) -
i'm searching in datatable
datarow[] found = table.select(f_sep);
//table - datatable, f_sep - string query looks like: f_text '%some_word%'
in query need use %
percent(to find percent values). if in query write 5% return results 5 , other symbols after it, tried replace %:
string stt = textbox.text.replace("%", "'%'");
i error - can't use operator mod
replace("%", "\"%\"");
i error using operator.
how can replace % ?
you need escape % sign,
use brackets. 75%
where mycol '%75[%]%'
Comments
Post a Comment