How to translate the PostgreSQL array_agg function to SQLite?

前端 未结 1 1053
猫巷女王i
猫巷女王i 2021-01-12 06:51

This query works in PostgreSQL:

  Select    ot.MCode,array_to_string(array_agg(tk1.TName || \',\' || ot.TTime), \' - \') as oujyu_name_list
    From    TR_A          


        
相关标签:
1条回答
  • 2021-01-12 07:52

    For this query, you can use group_concat, which directly returns a string:

    SELECT ..., group_concat(tk1.TName || ',' || ot.TTime, ' - ')
    FROM ...
    
    0 讨论(0)
提交回复
热议问题