-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.ijs
More file actions
24 lines (15 loc) · 1.05 KB
/
test.ijs
File metadata and controls
24 lines (15 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
NB. |CompAcct|CostAllowance|ExtCost|ExtPriceNoFunds|InvDateYYYYMMDD|QtyShipped|UniqueID|CompItem|CustProdKey|InvoiceYearMonth|ShiptoState|
PATH =: 'c:/d3/flooring/haines/d3db/'
0 [ tblx =: ('autosym';1) (151!:3) (<PATH)
NB. ('addcol';'InvoiceYearMonth is left(InvDateYYYYMMDD;4)') } tblx
NB. ('addcol';'CustProdKey is CompAcct & ''|'' & CompItem ') } tblx
NB. PATH s: tblx
NB. 0 [ agg =: (<'CustProdKey') ('+/ ExtPriceNoFunds';'+/ ExtCost' ) /. !. 'noparse' tblx
NB. aggregate('CustProdKey';(<'foo is +/ ExtPriceNoFunds');tblx)
NB. aggregate('InvoiceYearMonth';(<'foo is +/ ExtPriceNoFunds');tblx)
NB. agg =: (<'InvoiceYearMonth') (<'+/ ExtPriceNoFunds') /. !. 'noparse' tblx
NB. agg =: (<'CustProdKey') (<'+/ ExtPriceNoFunds') /. !. 'noparse' tblx
NB. aggregate('InvoiceYearMonth';(<'foo is +/ ExtPriceNoFunds');tblx)
NB. # aggregate('CustProdKey';(<'foo is +/ ExtPriceNoFunds');tblx)
10 {. aggregate('CustProdKey';('foo is +/ ExtPriceNoFunds';'Month is {. CompAcct';'Foo is {. CompItem');tblx)
# aggregate(('CompAcct';'CompAcct');(<'foo is +/ ExtPriceNoFunds');tblx)