Re: results of SPLIT when keys not unique

2017-11-03 Thread Jim Lambert via use-livecode
> Monte wrote: > > Perhaps something like: > > split by and [{replacing | > splitting | ignoring} duplicates] Yes. +1 Jim Lambert ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and ma

RE: results of SPLIT when keys not unique

2017-11-02 Thread Ralph DiMola via use-livecode
] Sent: Thursday, November 02, 2017 6:49 PM To: rdim...@evergreeninfo.net Cc: How to use LiveCode Subject: Re: results of SPLIT when keys not unique On Thu, Nov 2, 2017 at 3:45 PM, Ralph DiMola wrote: > Whoops, not tested and I saw an error. > > Select mytable.animalname,mytable.animalnu

Re: results of SPLIT when keys not unique

2017-11-02 Thread Dr. Hawkins via use-livecode
On Thu, Nov 2, 2017 at 3:45 PM, Ralph DiMola wrote: > Whoops, not tested and I saw an error. > > Select mytable.animalname,mytable.animalnumber from (select distinct > mytable.animalname from mytable as mytable2) left join mytable on > mytable.animalname = mytable2animalname You're a bit over my

Re: results of SPLIT when keys not unique

2017-11-02 Thread Bob Sneidar via use-livecode
The last one of course. Bob S > On Nov 2, 2017, at 15:39 , Monte Goulding via use-livecode > wrote: > > A quick test and it looks like split will clobber any new elements with the > same key as those previously parsed. The docs state that only one element > will be created but are unclear

Re: results of SPLIT when keys not unique

2017-11-02 Thread Dr. Hawkins via use-livecode
On Thu, Nov 2, 2017 at 3:39 PM, Monte Goulding via use-livecode wrote: > It would probably be nice to have some explicit syntax to govern this > behavior so that you could explicitly declare > you want clobbering behavior or first come best dressed. explicit is (almost) always nice (says the gu

Re: results of SPLIT when keys not unique

2017-11-02 Thread Dr. Hawkins via use-livecode
On Thu, Nov 2, 2017 at 3:45 PM, Ralph DiMola wrote: > Whoops, not tested and I saw an error. > > Select mytable.animalname,mytable.animalnumber from (select distinct > mytable.animalname from mytable as mytable2) left join mytable on > mytable.animalname = mytable2animalname > You just shot *way*

Re: results of SPLIT when keys not unique

2017-11-02 Thread Monte Goulding via use-livecode
> On 3 Nov 2017, at 9:39 am, Monte Goulding wrote: > > It would probably be nice to have some explicit syntax to govern this > behavior so that you could explicitly declare you want clobbering behavior or > first come best dressed. Oh… one might also feasibly want output like this I guess: v

RE: results of SPLIT when keys not unique

2017-11-02 Thread Ralph DiMola via use-livecode
...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Dr. Hawkins via use-livecode Sent: Thursday, November 02, 2017 6:24 PM To: How to use LiveCode Cc: Dr. Hawkins Subject: results of SPLIT when keys not unique If I use split such that keys

RE: results of SPLIT when keys not unique

2017-11-02 Thread Ralph DiMola via use-livecode
-Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Dr. Hawkins via use-livecode Sent: Thursday, November 02, 2017 6:24 PM To: How to use LiveCode Cc: Dr. Hawkins Subject: results of SPLIT when keys not unique If I use split such that keys are not

Re: results of SPLIT when keys not unique

2017-11-02 Thread Monte Goulding via use-livecode
A quick test and it looks like split will clobber any new elements with the same key as those previously parsed. The docs state that only one element will be created but are unclear about which element value will be retained. It would probably be nice to have some explicit syntax to govern this

results of SPLIT when keys not unique

2017-11-02 Thread Dr. Hawkins via use-livecode
If I use split such that keys are not unique, will that have the effect of filtering out duplicates? For example, if I have dog 3 dog 5 cat 8 and SPLIT it, will I end up with 5 in entry dog? More specifically, is this a defined behavior, or "just how it currently works" I'm trying to find