欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

工作日记--将接口表直接变成查询的代码

程序员文章站 2022-06-28 20:50:00
private void button1_Click(object sender, EventArgs e) { string txt = this.richTextBox1.Text; txt = txt.Replace("\n", ",").Replace(" ", "!"). Replac..... ......
private void button1_click(object sender, eventargs e)
        {
            string txt = this.richtextbox1.text;
            txt = txt.replace("\n", ",").replace("    ", "!").
                replace("        ", "!").        
                replace("            ", "!").
                replace("                ", "!").
                replace("                    ", "!").
                replace("                        ", "!").
                replace("                            ", "!").
                replace("                            ", "!").
                replace(",", "],max(case when col_name_en ='").
                replace("!", "' then actual else null end) as ").
                replace("as","as [").replace("[ ","[");
            this.richtextbox2.text = "max(case when col_name_en ='" + txt;
        }

工作日记--将接口表直接变成查询的代码