How best to handle null in cast of column subquery?
There are five records each with data in every column but when we run this 
statement below only some of the columns are returned. 
If we remove the cast statement then all columns are returned. The Age column 
is null in the records not being returned.

Embedded Derby 10.1.1

SELECT 
( SELECT 
first_name ||'|'||
last_name ||'|'||
GENDER ||'|'||
CAST(AGE AS varchar(3)) ||'|'||
MARITAL_STATUS
FROM esq.contact WHERE esq.contact.guid=esq.contact_list.contact_guid) AS "name"
FROM esq.contact_list WHERE esq.contact_list.link_table='mat' AND 
esq.contact_list.link_guid=78360;

println to Apache Tomcat Log 


  Record: 1
   name:                        Jane | Doe | F | 46 | Married 

  Record: 2
   name:                        

  Record: 3
   name: 

  Record: 4
   name: 

  Record: 5
   name: 


Sincerely,

         - Frank
        

Reply via email to