Answers for "in clause db2 c#"

C#
0

in clause db2 c#

string[] tags = new string[] { "ruby", "rails", "scruffy", "rubyonrails" };
const string cmdText = "select * from tags where '|' + @tags + '|' like '%|' + Name + '|%'";

using (SqlCommand cmd = new SqlCommand(cmdText)) {
   cmd.Parameters.AddWithValue("@tags", string.Join("|", tags);
}
Posted by: Guest on July-14-2020

C# Answers by Framework

Browse Popular Code Answers by Language