Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE EXTERNAL TABLE IF NOT EXISTS db.tableB LIKE db.tableA;
- insert overwrite table db.tableB partition (yymmddval, yymmddcrt)
- select *
- from db.tableA
- where 1=1
- and yymmddval between '${start}' and '${end}' ; # date 1 to date 7
- insert into table db.tableB partition (yymmddval, yymmddcrt)
- select *
- from db.tableA
- where 1=1
- and yymmddval between '${start}' and '${end}' ; # date 11 to date 17
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement