Adam Witney wrote:
The missing values seemed to have been ignored and so the data is being
shifted to the left and so put in the wrong columns.

Am I using this function correctly? What is supposed to happen with missing
values?

Yeah, that's a limitation of the version of crosstab distributed with 7.3. And (believe it or not) I've actually found cases where that behavior is useful. There is another version of crosstab ("hashed" crosstab) that treats missing values the way you expect. You can grab a copy backported for 7.3 here:
http://www.joeconway.com/
You want the one that says: "contrib/tablefunc backported for PostgreSQL 7.3.x -- sync'd with CVS HEAD 02-Oct-2003"


HTH,

Joe


---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to