My Assistant
![]() ![]() |
|
|
Dec 2 2011, 08:14 AM
Post
#1
|
|
|
UtterAccess Member Posts: 35 |
Hi,
I'm sure this is easy and I'm just overlooking something but I'm trying the use an update query with a replace statement to remove part of the data in a field but am having no luck... I have a column with this type of data: Column Name = test RGRR.N0000 EWES.W0014 YUY.P0022 UYUI.N0001 After running the query I'd like to data to just be: RGRR EWES YUY UYUI In the update to field I have Replace([test],".*","") - thinking this would remove anything after the dot in the data but it doesn't seem to work... Thanks for any pointers you can offer in where I'm gonig wrong.... |
|
|
|
Dec 2 2011, 08:29 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 17,620 From: Don Mills, ON (Canada) |
Try
CODE Left([test], InStr([test], ".") - 1) If there's a chance that there might be entries without the period, try CODE IIf(InStr([test], ".") > 1, Left([test], InStr([test], ".") - 1), [test])
|
|
|
|
Dec 2 2011, 08:37 AM
Post
#3
|
|
|
UtterAccess Member Posts: 35 |
Works a dream! Thanks for your help!
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 12:12 AM |