[font="Arial Black"]I want to compare a column value if following char are in the string then need to split it ?
MY C# CODE :[/font]
string val = strtxt.Text.Trim();
if (val.Contains("N") == true && val.Contains("E") == true && val.Contains("M") == true && val.Contains("H") == true && val.Contains("T") == true && val.Contains("V") == true && val.Contains("L") == true && val.Contains("C") == true)
{
string[] pvalues = val.Split(new char[] { 'N', 'E', 'M', 'H', 'T', 'V', 'L', 'C' });
foreach (string s in pvalues)
{
if (s.Trim() != "")
{
lstsplit.Items.Add(s);
lblmsg.Text = "split succesfully";
}
}
}
else
{
lblmsg.Text = "split cant be done";
}
[font="Arial Black"]I used above code to compare and split the string and want to do in sql server trigger after insert on table. Any help regarding this.[/font]