Re: Subject: Re: Stripping blank spaces before and after a word. Help
On 11/3/06, Ken Ray [EMAIL PROTECTED] wrote: Anybody have a good way to convert all text in a list to ALL CAPS? It would be nice to get a consistent look in the database. Here is the script I settled on. repeat with x = 1 to the number of items of MyList put word 1 to -1 of item x of Mylist into item x of Mylist end repeat Try this: repeat with x = 1 to the number of items of MyList put toUpper(word 1 to -1 of item x of Mylist) into item x of Mylist end repeat I'm probably too late for this one, but also remember that SQL has the UPPER() function. In your case it probably doesn't make a difference as you are already repeating through each item so adding 'toUpper' probably adds little overhead - I'm not sure how much is wasted on trying to set numbers toUpper? In the future if you don't already have a convenient repeat loop, the following will probably be quicker than getting Rev to do the grunt work: INSERT INTO test VALUES ('number','date','lower text','number','upper text') all you need to do is amend it to INSERT INTO test VALUES ('number','date','lower text','number',UPPER('upper text')) SQL does the grunt work and only on the data that matters:-) ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Subject: Re: Stripping blank spaces before and after a word. Help
Thanks Mark, I settled on this and it works SWT ! Thanks For your help. Now to finish it up. Anybody have a good way to convert all text in a list to ALL CAPS? It would be nice to get a consistent look in the database. Here is the script I settled on. repeat with x = 1 to the number of items of MyList put word 1 to -1 of item x of Mylist into item x of Mylist end repeat Then I run another script to turn MyList containing mydata1,mydata2,mydata3, into 'mydata1','mydata2','mydata3' for entry int the databse. Perhaps I can do it all in the same repeat loop. Get rid of the spaces, change the text to all caps and then wrap the data in 'single quotes' for SQL data entry if the data is not a number or a date. Anybody wanna throw down on this one? Mark Wrote Dave, I think you are looking for something like this repeat for each item myVar in var1,var2,var2 do put word 1 to -1 of myVar into myVar end repeat or repeat for each line myLine in fld 1 put (word 1 to -1 of myLine) cr after myList end repeat put word 1 to -1 of myList into fld 1 Best, Mark Does anyone have a handy little script that could be put in a repeat loop to evaluate either the contents of several fields, or a comma delimitered list of variables, and strip any blank spaces that may or may not exist from before and after the contents. To ready the data for insertion into a database. I am having an issue with data being entered with spaces before of after the words, and then not showing up in a data query because of that. I usualy insert the datra from several fields into a list such as var1,var2,var3, etc before entering it into a database. Thanks Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Subject: Re: Stripping blank spaces before and after a word. Help
convert all text in a list to ALL CAPS look up upper in the docs. then wrap the data in 'single quotes' for SQL data entry numerous posts on this topic recently. Do a search for SQL in the Rev archives to find several ways of doing SQL formatting (merge, concatenation, function calls, replace) then choose your own flavor. http://www.mail-archive.com/use-revolution@lists.runrev.com/ Jim Ault Las Vegas On 11/2/06 10:04 AM, Dave Herndon [EMAIL PROTECTED] wrote: Thanks Mark, I settled on this and it works SWT ! Thanks For your help. Now to finish it up. Anybody have a good way to convert all text in a list to ALL CAPS? It would be nice to get a consistent look in the database. Here is the script I settled on. repeat with x = 1 to the number of items of MyList put word 1 to -1 of item x of Mylist into item x of Mylist end repeat Then I run another script to turn MyList containing mydata1,mydata2,mydata3, into 'mydata1','mydata2','mydata3' for entry int the databse. Perhaps I can do it all in the same repeat loop. Get rid of the spaces, change the text to all caps and then wrap the data in 'single quotes' for SQL data entry if the data is not a number or a date. Anybody wanna throw down on this one? Mark Wrote Dave, I think you are looking for something like this repeat for each item myVar in var1,var2,var2 do put word 1 to -1 of myVar into myVar end repeat or repeat for each line myLine in fld 1 put (word 1 to -1 of myLine) cr after myList end repeat put word 1 to -1 of myList into fld 1 Best, Mark Does anyone have a handy little script that could be put in a repeat loop to evaluate either the contents of several fields, or a comma delimitered list of variables, and strip any blank spaces that may or may not exist from before and after the contents. To ready the data for insertion into a database. I am having an issue with data being entered with spaces before of after the words, and then not showing up in a data query because of that. I usualy insert the datra from several fields into a list such as var1,var2,var3, etc before entering it into a database. Thanks Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Stripping blank spaces before and after a word
A simple script to accomplish the removal of blank spaces (in field datafield) is as follows: repeat with x = 1 to the number of chars in field datafield if char x of field datafield is then delete char x of field datafield end repeat Steve Goldberg In a message dated 11/2/06 1:02:47 PM, [EMAIL PROTECTED] writes: Does anyone have a handy little script that could be put in a repeat loop to evaluate either the contents of several fields, or a comma delimitered list of variables, and strip any blank spaces that may or may not exist from before and after the contents. To ready the data for insertion into a database. I am having an issue with data being entered with spaces before of after the words, and then not showing up in a data query because of that. I usualy insert the datra from several fields into a list such as var1,var2,var3, etc before entering it into a database. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Subject: Re: Stripping blank spaces before and after a word. Help
On 11/2/06 11:04 AM, Dave Herndon [EMAIL PROTECTED] wrote: Thanks Mark, I settled on this and it works SWT ! Thanks For your help. Now to finish it up. Anybody have a good way to convert all text in a list to ALL CAPS? It would be nice to get a consistent look in the database. Here is the script I settled on. repeat with x = 1 to the number of items of MyList put word 1 to -1 of item x of Mylist into item x of Mylist end repeat Try this: repeat with x = 1 to the number of items of MyList put toUpper(word 1 to -1 of item x of Mylist) into item x of Mylist end repeat Ken Ray Sons of Thunder Software, Inc. Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Stripping blank spaces before and after a word
from before and after the contents was the original request. Unfortunately your script would delete all spaces, not just line ending and beginning, phrase ending and beginning, and those between quotes, such as 60W light bulb That's why using word 1 to -1 of containerText does the job, or word 1 to -1 of line x of field description. Jim Ault Las Vegas On 11/2/06 1:10 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: A simple script to accomplish the removal of blank spaces (in field datafield) is as follows: repeat with x = 1 to the number of chars in field datafield if char x of field datafield is then delete char x of field datafield end repeat Steve Goldberg In a message dated 11/2/06 1:02:47 PM, [EMAIL PROTECTED] writes: Does anyone have a handy little script that could be put in a repeat loop to evaluate either the contents of several fields, or a comma delimitered list of variables, and strip any blank spaces that may or may not exist from before and after the contents. To ready the data for insertion into a database. I am having an issue with data being entered with spaces before of after the words, and then not showing up in a data query because of that. I usualy insert the datra from several fields into a list such as var1,var2,var3, etc before entering it into a database. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Stripping blank spaces before and after a word. Help
Does anyone have a handy little script that could be put in a repeat loop to evaluate either the contents of several fields, or a comma delimitered list of variables, and strip any blank spaces that may or may not exist from before and after the contents. To ready the data for insertion into a database. I am having an issue with data being entered with spaces before of after the words, and then not showing up in a data query because of that. I usualy insert the datra from several fields into a list such as var1,var2,var3, etc before entering it into a database. Thanks Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Stripping blank spaces before and after a word. Help
Hi Dave, I think you are looking for something like this repeat for each item myVar in var1,var2,var2 do put word 1 to -1 of myVar into myVar end repeat or repeat for each line myLine in fld 1 put (word 1 to -1 of myLine) cr after myList end repeat put word 1 to -1 of myList into fld 1 Best, Mark -- Economy-x-Talk Consultancy and Software Engineering http://economy-x-talk.com http://www.salery.biz Get your store on-line within minutes with Salery Web Store software. Download at http://www.salery.biz Op 1-nov-2006, om 18:54 heeft Dave Herndon het volgende geschreven: Does anyone have a handy little script that could be put in a repeat loop to evaluate either the contents of several fields, or a comma delimitered list of variables, and strip any blank spaces that may or may not exist from before and after the contents. To ready the data for insertion into a database. I am having an issue with data being entered with spaces before of after the words, and then not showing up in a data query because of that. I usualy insert the datra from several fields into a list such as var1,var2,var3, etc before entering it into a database. Thanks Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution