dimanche 10 juillet 2016

Using RedShift CURSOR to insert and iterate

I recently found that RedShift supports CURSOR, and more specifically it supports the commands: DECLARE & FETCH. I managed to create a cursor and fetch some of its rows but didn't find a way to:

  1. Insert the fetched results into neither table or variable.
  2. Iterate over the rows of the declared cursor in a dynamic fashion (based on while or any logical test)

I didn't find any documentation on Amazon on how to do that, does someone know if that is even possible? Thanks.

Aucun commentaire:

Enregistrer un commentaire