Questions about null fields.
Created by: timothyjlaurent
Hi I love this function although I had a difficult time getting it working for some tables initially.
I had to make the following change to the program to get it working :
#fieldType = ("numeric(%i, %i)" %(numericFieldWidth, columnScale))
fieldType = ("double precision")
I am wondering now how I can get NULL values to show up?
# This trick makes possible to get rid of the null values in the pivoted tables.
# TODO: Consider to make it optional, with a parameter for it.
replaceZeros = ['coalesce("{0}",0) as "{0}"'.format(destColumn["columns"]) for destColumn in destColumns]
replaze0 = ','.join(replaceZeros)
What should I do here to make null values show up instead of '0'
Thanks for the great function and any help.
Next project for me is to pivot varchar fields.