C
Charles D Clayton Jr
Is it possible to use the Split Function in a query? I seem to recall
reading that some functions in A2K would not work in an expression but
that if you created your own function, then you could use it.
However, I am unable to get anything to work. I did come across Allen
Browne's explanation from 2003-10-15
microsoft.public.access.tablesdbdesign, but I could not get it to
work. It keep giving me an error.
I also seem to recall reading exactly the opposite that you could not
return an array to a query.
All I want to do is to split BDP-2-SA-A-9054-1 into 5 groups BPD, 2,
SA, A, 9054-1 and from looking at the help on Split it will do it - if
I can get it to work. Any suggestions/help?
Thanks,
Charles D Clayton Jr
reading that some functions in A2K would not work in an expression but
that if you created your own function, then you could use it.
However, I am unable to get anything to work. I did come across Allen
Browne's explanation from 2003-10-15
microsoft.public.access.tablesdbdesign, but I could not get it to
work. It keep giving me an error.
After importing (or attaching) the spreadsheet data into a field named (say)
FullName, create a query into this table.
Enter this expression into a fresh column of the query design grid, in the
Field row:
FirstName: Split([FullName], " ")(0)
and in another column:
LastName: Split([FullName], " ")(1)
After verifying that these expressions give the right results, you can
change the query to an Update query (Update on Query menu), and place a
similar expression in the Update row under each field. Drop the alias. So
the Update row under your FirstName field will be:
Split([FullName], " ")(0)
The Split function parses the FullName field at the space.
The number in brackets specifies which word you want, where 0 is the first
word, 1 is the next, and so on.
I also seem to recall reading exactly the opposite that you could not
return an array to a query.
All I want to do is to split BDP-2-SA-A-9054-1 into 5 groups BPD, 2,
SA, A, 9054-1 and from looking at the help on Split it will do it - if
I can get it to work. Any suggestions/help?
Thanks,
Charles D Clayton Jr