zOs/TX/QBDPSINS
insert into QTXCRX.tqbDPS (BE010001, BE010002, BE010003, BE010004
, BE010005, BE010006, BE010007, BE010009, BE010010
, BE010011, BE010012, BE010013, BE010014, BE010015, BE010016
, BE010017, BE010018, BE010089)
with r1 (c) as
(
select 1 from sysibm.sysdummy1
union all select c+1 from r1 where c < 10000
)
, r2 (c, r, t, l) as
(
select c, rand(c), cast('' as varchar(30)), 0 from r1
union all select c, rand(r * 2147483629 + 1)
, t || substr('abcdefghijklmnopqrstuvwxyz 0123456789<>.'
|| 'ABCDEFGHIJKLMNOPQRSTUVWXYZ+*%&/()=?\[]{}'
, floor(r*80+1), 1)
, l+1
from r2 where l < 30
)
, r (c, i, j, d, e, t) as
(
select c
, int(floor(r * 2147483629 + 1))
, int(floor(rand(r * 2147483629 + 1) * 2147483629 + 1))
, date('01.01.2010') + floor(1000
* rand(1 + 2147483629 * rand(r * 2147483629 * 1))) days
, timestamp('2010-01-01-00.00.00')
+ floor(1000 * rand(1 + 2147483629
* rand(1 + 2147483629 * rand(1 + r * 2147483629)))) days
+ (floor(86400 * rand(1 + 2147483629 * rand(1 + 2147483629
* rand(1 + 2147483629 * rand(1 + 2147483629*r)))))+r) seconds
, t
from r2
where l = 30
)
, b as
(
select mod(c, 25600) + 1 b01
, 'techBez' || strip(mod(c, 7)) || 'und' || strip(mod(c, 7)) b02
, d b03
, d + mod(i, 211) days b04
, e b05
, case when mod(c, 97) = 0 then 'L'
when mod(c, 23) = 0 then 'D'
when mod(c, 7) = 0 then 'P'
else 'U' end b06
, substr(t, 18, 1) b07
, substr(t, 20, 1) b09
, substr(t, 21, 1) b10
, substr(t, 22, 1) b11
, substr(t, 23, 1) b12
, substr(t, 24, 1) b13
, substr(t, 25, 1) b14
, substr(t, 26, 5) || substr(t, 1,15) b15
, i b16
, j b17
, mod(j, 12345) + 0.0001 * mod(j, 5432) b18
, timestamp('2014-03-01.00.00.00') + mod(c, 31) days b89
from r
)
select * from b
;
commit