Board index » delphi » Concatenating field on Interbase

Concatenating field on Interbase

When we run a sql to concatenate fields to one if any field is blank the
result is blank.  This behavior is not consistant between all SQL DB's.

SELECT  ((((CITY || ', ') || STATE) || ' ') || ZIP_CODE) as FullCity
FROM PEOPLE

the data looks like:
0                      
217             GA      30004
218     Atlanta GA      30303
219     Small Town      30303

In Paradox the result set is:
0       ,  
217     , GA 30004
218     Atlanta, GA 30303
219     Small Town,  30303

In Interbase the result set is:
0      
217    
218     Atlanta, GA 30303
219    

Any and all ideas are welcome on how to correct this behavior.

 

Re:Concatenating field on Interbase


If one of your fields is a NULL this will cause trouble use UPDATE field set
Field = '' where Field is Null

Other Threads