Skip to Content
0
Apr 10, 2014 at 09:32 AM

Table column type error using ARRAY_AGG in SQLScript

119 Views

When activating codes above, I got an error message ("line 41" below means "line 16"):

Does anyone know how to fix it?

By the way, what are the ways if I want to add one new column in table variable in SQLScript functions (say, "temp_major_list" variable above)?

I try to ARRAY_AGG the existing two columns in the table variable first, and build one more column in array, and finally UNNEST all three arrays into a new table variable.

Any other suggestions?

Thank you and best regards,

Angel

Attachments

Capture.JPG (35.9 kB)
Capture.JPG (59.9 kB)