combine fields

Hi, I have the following table data: sector symbol COMP AAPL COMP DELL COMP INTC TELE VZ TELE T I would like to combine symbol fields by sector. The results shouldbe: COMP AAPL, DELL, INTC TELE VZ, T Is there an easy way in q to accomplish this? Thanks in advance. Nick

To: personal-kdbplus@googlegroups.comX-Mailer: Apple Mail (2.1076)q)t:(sector:COMPCOMPCOMPTELETELE;symb:AAPLDELLINTCVZT)q)tsector symb-----------COMP AAPLCOMP DELLCOMP INTCTELE VZTELE Tq)select symb by sector from tsector| symb------| ---------------COMP | AAPLDELLINTCTELE | VZTq)exec symb by sector from tCOMP| AAPLDELLINTCTELE| VZTq)On 21.09.2009, at 19:54, Ninja Li wrote:>> Hi,>> I have the following table data:>> sector symbol> COMP AAPL> COMP DELL> COMP INTC> TELE VZ> TELE T>> I would like to combine symbol fields by sector. The results should> be:> COMP AAPL, DELL, INTC> TELE VZ, T>> Is there an easy way in q to accomplish this?>> Thanks in advance.>> Nick

User-Agent: G2/1.0X-Google-Token: IZ9SBQwAAACnXixVQe2J3HPup8lGX76WX-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.21 Safari/532.0,gzip(gfe),gzip(gfe)Message-ID: <1a5f27e1-7d4b-4594-8749-674bcf419027@d34g2000vbm.googlegroups.com>Subject: Re: combine fieldsFrom: Alex To: “Kdb+ Personal Developers” X-Google-Approved: charlie@kx.com via web at 2009-09-21 18:13:14by should work.select symbol by sector from tableOn Sep 21, 12:54?pm, Ninja Li <nickli2…> wrote:> Hi,>> ? ?I have the following table data:>> ? ? sector ? ? ?symbol> ? ? COMP ? ? AAPL> ? ? COMP ? ? DELL> ? ? COMP ? ? INTC> ? ? TELE ? ? ? VZ> ? ? TELE ? ? ? T>> ? I would like to combine symbol fields by sector. The results should> be:> ? ?COMP ? AAPL, DELL, INTC> ? ?TELE ? ? VZ, T>> ? Is there an easy way in q to accomplish this?>> ? Thanks in advance.>> ? Nick</nickli2…>

that will only select the last symbol per sector, not all of them, right?

nevermind.didn’t see the symbol

Thanks all for your help.On Sep 21, 11:04?pm, Kartik Arora <aror…> wrote:> nevermind.didn’t see the symbol>>>>>> On Mon, Sep 21, 2009 at 11:02 PM, Kartik Arora <aror…> wrote:> > that will only select the last symbol per sector, not all of them, right?>> > On Mon, Sep 21, 2009 at 1:59 PM, Alex <agono…> wrote:>> >> by should work.>> >> select symbol by sector from table>> >> On Sep 21, 12:54 pm, Ninja Li <nickli2…> wrote:> >> > Hi,>> >> > ? ?I have the following table data:>> >> > ? ? sector ? ? ?symbol> >> > ? ? COMP ? ? AAPL> >> > ? ? COMP ? ? DELL> >> > ? ? COMP ? ? INTC> >> > ? ? TELE ? ? ? VZ> >> > ? ? TELE ? ? ? T>> >> > ? I would like to combine symbol fields by sector. The results should> >> > be:> >> > ? ?COMP ? AAPL, DELL, INTC> >> > ? ?TELE ? ? VZ, T>> >> > ? Is there an easy way in q to accomplish this?>> >> > ? Thanks in advance.>> >> > ? Nick>> > –> > Kartik Arora>> –> Kartik Arora- Hide quoted text ->> - Show quoted text -</nickli2…></agono…></aror…></aror…>