Quantcast
Viewing all articles
Browse latest Browse all 6412

Table column type error using ARRAY_AGG in SQLScript

Image may be NSFW.
Clik here to view.
Capture.JPG

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

Image may be NSFW.
Clik here to view.
Capture.JPG

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


Viewing all articles
Browse latest Browse all 6412

Trending Articles