Dear Team,
please help me with below query.
i am trying to match two columns at same time from source and destination files.
i have used below image query for one column matching,
i would like to know how to write for second column as well…
so that it matches both the columns at same time and provide me the output.
please help !!!
DT_Dynamic = destination file
str_Nametobemapped = Destination file column Name
SourceNameValue = source column value
The 2nd Column Variable is
vtext = destination file column name
text = source column value
Just use AND. E.g.
DT.Select("[First Name] = 'John' AND [Last Name] = 'Doe'")
thank you… though it was so confusing because of “”“”“” all this string opener… but achieved somehow…
DT_Dynamic.Select(“[”+ str_NameToBeMapped+“]= '”+sourceNameValue+“’ and [”+ vShortText +“]= '”+ShortText+“'” )
1 Like
You are welcome! If you find double/single quotes confusing, maybe String.Format() could make your life easier in the future.
String.Format("[{0}] = '{1}' AND [{2}] = '{3}'", str_NameToBeMapped, sourceNameValue, vShortText, ShortText)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.