This is true of just about everything, not only max() -- there are *no* functions yielding varchar in recent PG releases
Thanks for the information. I added an explicit cast to the max() output and it works fine. Anyway, for those using VB, this is potentially hazardous. Knowing that the underlying data is of type 'varchar', one has to be always very cautious about the 'text' conversion, otherwise all readings after the first will return null instead of valid data. Helder M. Vieira ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org