|
|
@@ -88,7 +88,7 @@ namespace UAS_MES_NEW.Query
|
|
|
for (int i = importdata.Rows.Count - 1; i >= 0; i--)
|
|
|
{
|
|
|
string Refer = importdata.Rows[i]["Refer"].ToString();
|
|
|
- DataTable bom = (DataTable)dh.ExecuteSql("select bd_soncode,replace(wm_concat(distinct bd_location),',',' ')||';'||replace(wm_concat(distinct bd_soncode),',',' ')||case when wm_concat(distinct PRE_REPCODE) is null then ' ' else ' ' end||replace(wm_concat(distinct PRE_REPCODE),',','')||case when wm_concat(distinct PRE_REPCODE) is null then '' else ' ' end from BOMDetail " +
|
|
|
+ DataTable bom = (DataTable)dh.ExecuteSql("select bd_soncode,replace(wm_concat(distinct bd_location),',',' ')||';'||replace(wm_concat(distinct bd_soncode),',',' ')||case when wm_concat(distinct PRE_REPCODE) is null then ' ' else ' ' end||replace(wm_concat(distinct PRE_REPCODE),',',' ')||case when wm_concat(distinct PRE_REPCODE) is null then '' else ' ' end from BOMDetail " +
|
|
|
"LEFT JOIN bom on bd_bomid=bo_id left join Product ON bd_soncode=pr_code left join ProdReplace on pre_bdid =bd_id where " +
|
|
|
"bo_mothercode='" + pr_code.Text + "' and instr(','||bd_location||',','," + Refer + ",')>0 group by bd_soncode", "select");
|
|
|
if (bom.Rows.Count > 0)
|