Guru: SELECT INTO And Arrays
March 8, 2021 Ted Holt
I got egg on my face again. I told a couple of colleagues that they could use the SELECT INTO statement to load multiple rows into an array data structure in an RPG program. Boy, was I wrong! I had confused SELECT INTO with the FETCH statement, of course, which retrieves data over which a cursor has been declared.
But the matter continued to nag me. I much like the simplicity of SELECT INTO. There’s no cursor to declare, open, fetch from and close, the same reason I like the FOR loop in SQL PL. It seemed (and continues …Read more