Jhstephenson I have a Full Name attribute that I want to split into FirstName and LastName attributes. I thought I could use the WORDS_FROM_LEFT or WORDS_FROM_RIGHT functions to do this. But apparently they only work with Derby. So, I am wondering what is the easiest way to do this in Aware?
rbross Hi Jim, There is a way to do this but I forget the function. I did something similar when creating a numbers to words program. If I remember right there is a function in Aware that will find the first space to split up two words in one attribute. I will look for it and get back to you.
intra Maybe something along the lines of this. FullString = John Smith Firstname = SUBSTRING(FullString, 0,INDEX_OF(' ',FullString)) Surname = SUBSTRING(FullString, INDEX_OF(' ',FullString),LENGTH(FullString))
Jhstephenson ACDC wroteBut apparently they only work with Derby. I use this extensively in MySql That's interesting. This is what it says in Appendix B of the User Guide: The following functions are supported only in Cloudscape/Derby database: WORD_NUMBER WORDS_FROM_LEFT WORDS_FROM_RIGHT
Jhstephenson intra wroteMaybe something along the lines of this. FullString = John Smith Firstname = SUBSTRING(FullString, 0,INDEX_OF(' ',FullString)) Surname = SUBSTRING(FullString, INDEX_OF(' ',FullString),LENGTH(FullString)) Thanks, that works.
Jhstephenson Jhstephenson wroteACDC wroteBut apparently they only work with Derby. I use this extensively in MySql That's interesting. This is what it says in Appendix B of the User Guide: The following functions are supported only in Cloudscape/Derby database: WORD_NUMBER WORDS_FROM_LEFT WORDS_FROM_RIGHT I also tried this and it works too. Apparently we aren't supposed to believe the documentation. 😃