Re: [sqlite] how to merge data from fields... if this is possible.

2012-05-29 Thread Petite Abeille
On May 29, 2012, at 8:12 PM, Pavel Ivanov wrote: > It's obeyed after aggregation. So the same query with GROUP BY won't > work. Although one might write something like this: According to the fine manual [1]: "The order of the concatenated elements is arbitrary." [1] http://www.sqlite.org/lang_

Re: [sqlite] how to merge data from fields... if this is possible.

2012-05-29 Thread Pavel Ivanov
> SELECT group_concat(fieldB,' ') FROM myTable WHERE fieldA = 'val1' ORDER BY > rowid > > Might get one of the values you wanted.  One concern is that I don't remember > whether the ORDER BY clause is obeyed before or after aggregation. It's obeyed after aggregation. So the same query with GROUP

Re: [sqlite] how to merge data from fields... if this is possible.

2012-05-29 Thread Black, Michael (IS)
lytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems From: [email protected] [[email protected]] on behalf of Simon Slavin [[email protected]] Sent: Tuesday, May 29, 2012 12:33 PM To:

Re: [sqlite] how to merge data from fields... if this is possible.

2012-05-29 Thread Simon Slavin
On 29 May 2012, at 6:24pm, Gert Van Assche wrote: > I have a dataset that looks like this: > > rowid ; fieldA ; fieldB > 1 ; val1 ; This is a > 2 ; val1 ; small > 3 ; val1 ; test. > 4 ; val2 ; The proof is in > 5 ; val2 ; the pudding. > > > And I would like to me

[sqlite] how to merge data from fields... if this is possible.

2012-05-29 Thread Gert Van Assche
All, I have a dataset that looks like this: rowid ; fieldA ; fieldB 1 ; val1 ; This is a 2 ; val1 ; small 3 ; val1 ; test. 4 ; val2 ; The proof is in 5 ; val2 ; the pudding. And I would like to merge all values in fieldB when the value in fieldA is the same. rowid