Esempio n. 1
0
        private string GetSqlCommand()
        {
            SqlForMetrology sql = new SqlForMetrology();

            int    fieldNum = 71;
            string fields   = "";

            for (int i = 71; i <= fieldNum; i++)
            {
                fields += "FIELD_" + i + ",";
            }

            string insertSql = string.Format(@"INSERT INTO METROLOGY (CONTEXTID, TIMETAG, {0}) {1}", fields.Substring(0, fields.Length - 1), sql.AbnormalByPiece());

            return(insertSql);
        }
Esempio n. 2
0
        private string GetSqlCommand(string contextID)
        {
            SqlForMetrology sql = new SqlForMetrology();

            string insertSql = string.Format(@"INSERT INTO METROLOGY {0}", sql.AbnormalByField(contextID));

            return(insertSql);

            /*
             * SQLStringMaker ssm = new SQLStringMaker();
             *
             * string sqlSyssetting = ssm.Syssetting();
             * string sqlProcess = ssm.Process();
             * string sqlMetrology = ssm.Metrology();
             *
             * string sysColName =
             *      "CONTEXTID, TIMETAG,TIME01, FIELD_1, FIELD_2, FIELD_3, FIELD_4,FIELD_5,FIELD_6,FIELD_7,FIELD_8,FIELD_9,FIELD_10,FIELD_11,FIELD_12";
             * string sysSqlCmd = string.Format(@"INSERT INTO SYSSETTING ({0}) {1}", sysColName, sqlSyssetting);
             *
             * string proColName = "CONTEXTID, TIMETAG, FIELD_1";
             * string proSqlCmd = string.Format(@"INSERT INTO PROCESS_AACVD100 ({0}) {1}", proColName, sqlProcess);
             *
             * int fieldNum = 1;
             * string fields = "";
             * for (int i = 1; i <= fieldNum; i++)
             * {
             *      fields += "FIELD_" + i + ",";
             * }
             * string metroColName = string.Format(@"CONTEXTID, TIMETAG, {0}", fields.Substring(0, fields.Length - 1));
             *
             * string metroSqlCmd = string.Format(@"INSERT INTO METROLOGY ({0}) {1}", metroColName, sqlMetrology);
             *
             * //return sysSqlCmd;
             * return proSqlCmd;
             * //return metroSqlCmd;
             */
        }