Guest User

Untitled

a guest
May 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. create table tb (arr_col array<string>)
  2.  
  3. insert into tb select array ('A','B') from (select 'temp') x
  4.  
  5. select tb.arr_col from tb
  6.  
  7. ..in select list returns a complex type 'ARRAY<STRING>'.
  8. Only scalar types are allowed in the select list.
  9.  
  10. select tb.arr_col.item from tb
  11.  
  12. ERROR: AnalysisException: Illegal column/field reference 'arr_col.item' with intermediate collection 'item' of type 'ARRAY<STRING>'
  13.  
  14. select arr_col array.item from tb , tb.arr_col array ;
Add Comment
Please, Sign In to add comment