Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script Error Field Not Found

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;

8 Replies
Not applicable
Author

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

Not applicable
Author

Coulc you do a search "assemblyseq" in all the script?

did you find it?

Not applicable
Author

I use this field in the script in other tables where it exists

Not applicable
Author

Can you share the rest of the script?

Not applicable
Author

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.

Not applicable
Author

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.

Not applicable
Author

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;

Not applicable
Author

The only difference is that the first script has "ProjectId" as a field in the JobDemand table.