Skip to main content

Oracle Cast Collect Equivalent in Vertica?

  • October 3, 2017
  • 2 replies
  • 17 views

jonnokc

Hi I am looking to see if there is an Oracle SQL Cast Collect equivalent in Vertica.

The was an easy way to "collect" column values together into the same cell instead of creating a new row.

Example:

Lake, Boats, Red
Lake, Boats, Blue

Would look like...

Lake, Boats, [Red | Blue]

2 replies

Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • October 4, 2017

There is no equivalent function in Vertica. In an Analytic Database I'm not sure which use case the Collect function would fulfill. Can you provide an example?


TomM
Forum|alt.badge.img
  • Participating Frequently
  • October 4, 2017

I'm probably off-base with this, and when I see the example I think of grouped columns.

https://my.vertica.com/docs/8.1.x/HTML/index.htm#Authoring/SQLReferenceManual/Statements/GROUPEDClause.htm?Highlight=grouped columns