unote 書けば書くほどに

20230125

string whereDEL_R = "R." + col1 + "," + "R." + col2;
string whereDEL_X = "X." + col1 + "," + "X." + col2;

string strSql_DEL =
"delete from " + repTN +
" where (" + whereDEL_R + ")" +
" not in (select " + whereDEL_X + " from " + xbbTN + ")";

DELETE FROM tab1 a
WHERE
(a.col1,a.col2) NOT IN (SELECT
b.col1
,b.col2
FROM
tab2 b);

strSql = strSql_DEL;
DB(strSql);

Console.WriteLine(strSql+"\r\n");
Console.WriteLine("完了");
Console.WriteLine()

textbox2.text = strSql+"\r\n"
textbox2.text = "\r\n" + textbox2.text + "完了\r\n"

//DELETEでIN句を使う方法
//https://oreno-it.info/archives/2982

//コンボボックス
//https://dianxnao.com/cs%E3%82%B3%E3%83%B3%E3%83%9C%E3%83%9C%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9/