Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MACHINE WEEK HOURS PIECES
- A 2018-12 1 2
- B 2018-12 3 4
- A 2018-13 12 1
- B 2018-13 2 5
- A 2018-15 6 6
- B 2018-15 2 2
- C 2018-16 2 1
- D 2018-17 4 22
- B 2018-17 3 9
- A 2018-18 1 8
- E 2018-18 4 4
- D 2018-13 2 4
- MACHINE 2018-12 2018-13 2018-14 2018-15 2018-16 2018-17 2018-18
- A 1H 2P 12H 1P 6H 6P 1H 8P
- B 3H 4P 2H 5P 2H 2P 3H 9P
- C 2H 1P
- D 2H 4P 4H 22P
- E 4H 4P
- this.edType = 1
- this.ehCols = 20
- this.ehStartval = date()+ 7
- this.ehKeyFld = "iif(usage.hours > 0 and usage.pieces > 0,STR(usage.hours,4) + 'H ' + STR(usage.pieces,3)+'P','')"
- select machine, iif(week='2018-12',str(hours,4) + 'H' + str(pieces,3) + 'P','') as '2018-12', IIF(week='2018-13',str(hours,4) + 'H' + str(pieces,3) + 'P','') as '2018-13', IIF(week='2018-14',str(hours,4) + 'H' + str(pieces,3) + 'P','') as '2018-14', IIF(week='2018-15',str(hours,4) + 'H' + str(pieces,3) + 'P','') as '2018-15', IIF(week='2018-16',str(hours,4) + 'H' + str(pieces,3) + 'P','') as '2018-16', IIF(week='2018-17',str(hours,4) + 'H' + str(pieces,3) + 'P','') as '2018-17', IIF(week='2018-18',str(hours,4) + 'H' + str(pieces,3) + 'P','') as '2018-18' from GCCTEST.dbo.usage
- machine 2018-12 2018-13 2018-14 2018-15 2018-16 2018-17 2018-18
- A 1H 2P
- B 3H 4P
- A 12H 1P
- B 2H 5P
- A 6H 6P
- B 2H 2P
- C 2H 1P
- D 4H 22P
- B 3H 9P
- A 1H 8P
- E 4H 4P
- D 2H 4P
Add Comment
Please, Sign In to add comment