Karen Springer <karen(dot)springer(at)wulfsberg(dot)com> writes:
> I need employeeName to be a text field in Access. I have tried casting
> the fields in the view as varchar, but it seem to default back to ::text.
The result of a || operator is always going to be type text. Put the
cast around the whole expression, not just the individual fields.
For instance,
CASE
WHEN "Participant_Names"."NameUsed" IS NULL THEN
("Participant_Names"."LastNAME" || ', ') || "Participant_Names"."FirstName"
ELSE ("Participant_Names"."LastNAME" || ', ') || "Participant_Names"."NameUsed"
END :: varchar AS "employeeName"
regards, tom lane