我有一个奇怪的问题,人们认为很容易解决。基本上我正在创建一个这样的字符串:
string temp = "SET pagesize 50000;" + Environment.NewLine + "SET linesize 120;" + Environment.NewLine + sQuery.Text + Environment.NewLine + resultsQuery;
sQuery 是一条更新语句,reslults 查询显示结果的细分。这是结果查询。更新查询的格式类似。
resultsQuery = "SELECT project_no, contact_date, SUM(CASE WHEN control_group = 'N' THEN 1 ELSE 0 END) \"CG = N\", SUM(CASE WHEN control_group = 'Y' THEN 1 ELSE 0 END) \"CG = Y\"" + "\r\n" +
"FROM OIC_TRACK_TEMP" + "\r\n" +
"WHERE job_no = " + tbJobNo.Text.Trim() + "\r\n" +
"AND cpm_customer_code = '" + lbClientID.Text.ToUpper() + "'" + "\r\n" +
"GROUP BY project_no, contact_date" + "\r\n" +
"ORDER BY contact_date, project_no;";
然后我将查询写入命令行:
updatessh.Write(temp);
命令行中的输出如下所示:
SET pagesize 50000;
SET linesize 120;
UPDATE TABLE_NAME
SET PROJECT_NO = 'test'
.
.
我怎样才能摆脱那里的双回车?甲骨文看到它们就会呕吐。
谢谢!