my sample query is--select ID from Emp where city='abc' OR pincode=123456 OR
SET @MyString = SUBSTRING(@MyString, 1, LEN(@MyString)-2)
string query = "select ID from Emp where city='abc' OR pincode=123456 OR "; int index = query.LastIndexOf("OR"); if (index >= 0) { query = query.Substring(0, index); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)