Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bnelson111
Creator
Creator

Table Links and Sums in Scripts, Create new field.

Was trying new ways to load data from different tables then add. Below is a script which successfully loads the data but i cant manage to calculate the new field "F". The calculation is required in the load statement as i want to sum the results in presentation. Any suggestions, thanks Brett

[link]:

SQL SELECT t0."estp-blank-l",

t0."estp-blank-w",

t0."k-est-code",

t1."estrc-coverage",

t1."estrc-weight-qty",

t1."estrc-usage",

t1.kinkcode,

t2.JobCode,

t3.OrderedQty

        // num((((((((([t0.estp-blank-l]*[t0.estp-blank-w])/1000)/1000)/100)*[t1.estrc-coverage])*t3OrderedQty)*[t1.estrc-usage])/1000)) as f

 

FROM

PUB.estprofile as t0,

PUB.estrcoat as t1,

PUB."PV_Job" as t2,

PUB."PV_JobLine" as t3

where t0."k-est-code" = t1."k-est-code"

and t0."k-est-code"=t2.EstCode

and t2.JobCode = t3.JobCode;

1 Solution

Accepted Solutions
bnelson111
Creator
Creator
Author

Yep was a issue on the script line.

((( (((t0."estp-blank-l"*t0."estp-blank-w")/1000000)*t1."estrc-coverage")*(t3.OrderedQty+2500))*t1."estrc-usage")/100000) as "Calculated Ink Kg"

now working.

View solution in original post

2 Replies
sinanozdemir
Specialist III
Specialist III

Hey Brett,

By just looking at the formula, it seems like you are missing "." in "t3OrderedQty". Maybe try to change it to "t3.OrderedQty" in order to see if it works.

Hope this helps.

bnelson111
Creator
Creator
Author

Yep was a issue on the script line.

((( (((t0."estp-blank-l"*t0."estp-blank-w")/1000000)*t1."estrc-coverage")*(t3.OrderedQty+2500))*t1."estrc-usage")/100000) as "Calculated Ink Kg"

now working.