4
There is a ready function in Firebird 2.5 that is the inverse of the list function?
When you make a
select list(campo,',') from tabela
is returned all field values in a single line separated by comma, I wanted a function that separates the field varchar
in several columns
tabelax
codigo informacao
1 'alfa, beta, gama'
2 'delta, peta, omega'
by doing the select codigo,comando(informacao,',') as inf from tabelax
he returns:
codigo inf
1 alfa
1 beta
1 gama
2 delta
2 peta
2 omega
Pivot and unpivot operations, I found this (https://www.mail-archive.com/[email protected]/msg06635.html) on Google
– Motta
sorry, but either and I didn’t understand the operation of the pivot or he doesn’t do what I need
– Stribus
In case it would be unpivot, the example there is indeed not good, this post ( http://stackoverflow.com/questions/22064313/how-to-do-a-sql-grouping-by-multiple-columns-including-days ) can help you
– Motta
I understood the pivot/unpivot is to convert row to column and vice versa. and this command tbm is not supported by Firebird.
– Stribus
Yes, but you find pages that quote how to simulate for Firebird.
– Motta