I have this code in MS SQL:
select * from table where column1 in (select column2 from table)
How can I translate this using a DataTable?
Something along the lines of: table.select("column1 in column2")
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you can’t.
but you can do it via linq + table.select:
EXPLANATION:
suppose you have a very simple table
ID CITY COUNTRY
1 NY USA
2 Moscow Russia
3 LA USA
4 St Peterburg Russia
FYI:
If you need to execute really cool SQL queries against DataTables\DataSets you can use NQuery it is very fast and standards compliant.