ÈçºÎ½«sql²éѯ½á¹û£¨²»Ö¹Ò»Ï²åÈëµ½Ò»ÕűíÖУ¬ÎÒÃÇÒ»°ã¿ÉÒÔÓÃÈçÏÂÐÎʽµÄsql
insert into table1
select field1,field2,... from table2
where ...
ËüÒªÇó¶ÔÓ¦µÄ²åÈëÏîÀàÐͱØÐëÒ»Ö¡£
ÁíÍ⣬µ±selectµÄ²éѯ½á¹ûÊÇtable1µÄËùÓÐ×ֶεÄʱºò£¬¿ÉÒÔÊ¡ÂÔtable1µÄÁÐ×ֶΣ¬Ð´³ÉÈçÏÂÐÎʽ£º
insert into table1(field1,field2,...)
select field1,field2,... from table2
where ...
ÔÚʵ¼Êµ±ÖÐÎÒÃÇ¿ÉÄÜÓöµ½ ½øÐÐ±íµ¥ÌÊý¾Ýʱ,Õâʱ±íµ¥ÀïÃæµÄÖµÊDZäÁ¿
strSql.Append("insert into tny_surveyArea(");
strSql.Append("surveyAreaId,TaskID,biologyId,biologyType,generationId,wormAgeId,statusId,damageCodeId,occurArea,deadTreeCount,Remark,SurveyTypeId,SurveyDate,surveyUserID,inputUserId,CheckStatus,GPSCoor,IsCheckData,SmallFieldID,Geometry, Geometry_XLO, Geometry_YLO, Geometry_XHI, Geometry_YHI");
strSql.Append(")");
strSql.Append(" select ");
strSql.Append("'" + model.surveyAreaId + "',");
strSql.Append("" + model.TaskID + ",");
strSql.Append("'" + model.biologyId + "',");
strSql.Append("'" + model.biologyType + "',");
&nb