repeat with n = 1 to length(tInput) if char n of tInput is a number then put "+" into char n of tInput else put "-" into char n of tInput end repeat
Or am I missing something? -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Mar 19, 2012, at 5:15 PM, Pete wrote: > I wonder if there might be a less ugly way to do this in LC instead of > SQL... > Pete > > On Mon, Mar 19, 2012 at 2:04 PM, Marek <reichenbach.ma...@gmail.com> wrote: > >> Thanks a lot! That helped me a lot man. >> >> Marek Reichenbach >> >> On 2012 Kov. 19, at 19:29, Ken Ray <k...@sonsothunder.com> wrote: >> >>> >>> On Mar 19, 2012, at 3:44 AM, Marek Reichenbach wrote: >>>> when i get for example: 1234567 -> i should get result +++++++, 123-56- >> I >>>> would get +++-++- . >>> >>> The only way I know is kind of ugly, requiring seven nested REPLACE >> statements: >>> >>> SELECT >> REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE("123-56-","1","+"),"2","+"),"3","+"),"4","+"),"5","+"),"6","+"),"7","+") >>> >>> This would return: >>> >>> +++-++- >>> >>> >>> Ken Ray >>> Sons of Thunder Software, Inc. >>> Email: k...@sonsothunder.com >>> Web Site: http://www.sonsothunder.com/ >>> >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your >> subscription preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> > > > -- > Pete > Molly's Revenge <http://www.mollysrevenge.com> > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode