Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    14

    Question Unanswered: any function/aggrega to do the SUM of string field ?

    hi !

    i'd like a function to get the sum (concatenate) all the field 's values in a column.

    for exemple, with table :
    id | lib
    ---------------------
    1 | toto
    2 | titi
    3 | tata


    i'd like this :
    SELECT SUM (lib) AS super FROM myTable and get this :
    1 row :
    super
    -----------------
    toto titi tata

    any idea ?

  2. #2
    Join Date
    Nov 2006
    Posts
    82
    Like that (test2 is table name)
    Code:
    select array_to_string(ARRAY(select lib from test2),' ');

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •