Skip to main content

row expression support?

  • March 6, 2014
  • 1 reply
  • 2 views

David_Wong
This syntax is a subquery within a SELECT.  How to translate it to Vertica?

select seg_id from ( values ('BBBBCXCSBCMC'), ('BBBBCXCSBCMB'), ('BBBBCXCSBCL0'), ('BBBBCXCSBCMD'), ('BBBBCXCSBCMH'), ('BBBBCXCSBCMG') ) as temp_segs (seg_id)

The values represent 6 row expressions.

1 reply

David_Wong
  • Author
  • New Participant
  • March 6, 2014
This seems to be the answer:
 SELECT seg_id FROM ( select  'BBBBCXCSBCMC' UNION ALL select 'BBBBCXCSBCMB' UNION ALL select..etc....  ) as temp_segs (seg_id)