Ekrem Tapan

Ekrem Tapan

  • NA
  • 967
  • 81.7k

how can i use multiple delimeter on arraylist

Apr 28 2016 4:16 AM
Hi everyone below i have a code 
 
string[] seledCats = new string[0];
var condsCats = EzCoding.Web.UI.QueryStringParsing.GetValue("CondsCats", EzCoding.Web.RequestMethod.Post);
if (condsCats != null)
{
seledCats = condsCats.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
}
string sheetValue = rblSheetList.SelectedValue;
string sqlExport = "";
sqlExport += "select md.DATE as '??', mc.CAT_NAME as 'CATEGORY_NAME',msc.MATERIALS_SUBCAT as SUBCATEGORY_NAME,mc.CAT_CODE as 'CATEGORY_CODE',";
sqlExport += " msc.TARGET_CODE as 'SUBCATEGORY_CODE',msc.UNIT,msc.SPECIFICATION,md.DATA, ";
sqlExport += " CAST(CASE when md.SHEET = '0' then '????' when md.SHEET = '1' then '??' ";
sqlExport += " when md.SHEET = '2' then '???' END as nvarchar) SHEET ";
sqlExport += " from MATERIALS_CAT as mc";
sqlExport += " Inner Join MATERIALS_SUBCAT as msc ";
sqlExport += " on msc.TARGET_SID = mc.CAT_CODE ";
sqlExport += " inner join MATERIALS_DATA as md ";
sqlExport += " on md.CODE = msc.TARGET_SID";
sqlExport += " where md.SHEET ='" + sheetValue + "' and mc.CODE in('"+ condsCats +"')";
 
my  condsCats value after getting value split like that A1,A2 , but i wantto split like that  'A1','A2' 
 
because need to use on sql query
 
anybody have an any idea for solve this stupid problem ?  

Answers (2)