Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have getting this error. The think is, the field it can not find is not listed in the table in the script. I seems to be pulling it from somewhere else?
Error:
Field not found - <assemblyseq>
SQL SELECT buytoorder,
company,
make,
openrelease,
orderline,
ordernum,
orderrelnum,
ourreqqty,
ourstockqty,
ourstockshippedqty,
partnum,
reqdate,
salesum,
sellingreqqty,
sellingstockshippedqty
FROM
epicor904.dbo.orderrel
Where buytoorder=0 and make=0 and openrelease=1
Script Section:
OrderDemand:
Left Keep (PART)
LOAD
company & '-' & partnum as Orderdemandlink,
orderline as demandline,
ordernum as demandordernum,
orderrelnum as demandrel,
ourstockqty,
ourstockshippedqty,
date(reqdate) as demandreq,
salesum as demandsalesum,
sellingreqqty,
sellingstockshippedqty;
SQL SELECT buytoorder,
company,
make,
openrelease,
orderline,
ordernum,
orderrelnum,
ourreqqty,
ourstockqty,
ourstockshippedqty,
partnum,
reqdate,
salesum,
sellingreqqty,
sellingstockshippedqty
FROM
//epicortest904.dbo.orderrel
epicor904.dbo.orderrel
Where buytoorder=0 and make=0 and openrelease=1;
What is even stranger is I tried commenting out the above script code and ran it again, and it applied the same error to the next table:
Field not found - <assemblyseq>
SQL SELECT company,
jobnum,
partnum,
partdescription
FROM epicor904.dbo.jobhead
Coulc you do a search "assemblyseq" in all the script?
did you find it?
I use this field in the script in other tables where it exists
Can you share the rest of the script?
MTLCost:
Left Keep (Eco)
LOAD
company & '-' & partnum as BOMcostlink,
avglaborcost +
avgburdencost +
avgmaterialcost +
avgsubcontcost +
avgmtlburcost as 'Material Cost';
SQL SELECT company,
partnum,
avglaborcost,
avgburdencost,
avgmaterialcost,
avgsubcontcost,
avgmtlburcost
FROM epicor904.dbo.partcost;
JobDemand:
Left Keep (PART)
LOAD
assemblyseq as Jobmatasm,
company & '-' & partnum as jobmatlink,
description as 'Job Material Description',
issuedcomplete,
issuedqty as jobmatissued,
ium as jobmatium,
jobnum as jobmatjobnum,
partnum as jobmatpart,
requiredqty as jobmatrequired,
date(reqdate) as jobmatreq;
SQL SELECT
assemblyseq,
baseuom,
company,
description,
issuedcomplete,
issuedqty,
ium,
jobcomplete,
jobnum,
partnum,
projectid,
requiredqty,
reqdate
FROM epicor904.dbo.jobmtl where issuedcomplete=0 and jobcomplete=0 and partnum<>'TOOLS';
OrderDemand:
Left Keep (PART)
LOAD
company & '-' & partnum as Orderdemandlink,
orderline as demandline,
ordernum as demandordernum,
orderrelnum as demandrel,
ourstockqty,
ourstockshippedqty,
date(reqdate) as demandreq,
salesum as demandsalesum,
sellingreqqty,
sellingstockshippedqty;
SQL SELECT buytoorder,
company,
make,
openrelease,
orderline,
ordernum,
orderrelnum,
ourreqqty,
ourstockqty,
ourstockshippedqty,
partnum,
reqdate,
salesum,
sellingreqqty,
sellingstockshippedqty
FROM
//epicortest904.dbo.orderrel
epicor904.dbo.orderrel
Where buytoorder=0 and make=0 and openrelease=1;
MTLCost is the last table that loads without error. JobDemand table seems to be the issue, it runs fine if I comment it out. I don't know what is causing this though
Edit: I must have changed something. I had a copy of my old script of this section before changes and I copied it over and it works fine now.
That's interesting. It would be interesting to compare the two scripts as there does not appear to be any issues (from a syntax perspective) with this portion of the script.
langaar9 wrote:
That's interesting. It would be interesting to compare the two scripts as there does not appear to be any issues (from a syntax perspective) with this portion of the script.
JobDemand:
Left Keep (PART)
LOAD
assemblyseq as Jobmatasm,
company & '-' & partnum as jobmatlink,
description as 'Job Material Description',
issuedcomplete,
issuedqty as jobmatissued,
ium as jobmatium,
jobnum as jobmatjobnum,
partnum as jobmatpart,
requiredqty as jobmatrequired,
date(reqdate) as jobmatreq;
SQL SELECT assemblyseq,
baseuom,
company,
description,
issuedcomplete,
issuedqty,
ium,
jobcomplete,
jobnum,
partnum,
requiredqty,
reqdate
FROM
//epicortest904.dbo.jobmtl
epicor904.dbo.jobmtl
where issuedcomplete=0 and jobcomplete=0 and partnum<>'TOOLS';
OrderDemand:
Left Keep (PART)
LOAD
company & '-' & partnum as Orderdemandlink,
orderline as demandline,
ordernum as demandordernum,
orderrelnum as demandrel,
ourstockqty,
ourstockshippedqty,
date(reqdate) as demandreq,
salesum as demandsalesum,
sellingreqqty,
sellingstockshippedqty;
SQL SELECT buytoorder,
company,
make,
openrelease,
orderline,
ordernum,
orderrelnum,
ourreqqty,
ourstockqty,
ourstockshippedqty,
partnum,
reqdate,
salesum,
sellingreqqty,
sellingstockshippedqty
FROM
//epicortest904.dbo.orderrel
epicor904.dbo.orderrel
Where buytoorder=0 and make=0 and openrelease=1;
The only difference is that the first script has "ProjectId" as a field in the JobDemand table.