C cstuckey Registered User. Local time Today, 15:46 Joined Mar 6, 2000 Messages 23 Jan 29, 2004 #1 Can you please help me? I'm trying to change my data in a field to delete anything after the "-". For example: XXXX-XXX to XXXX. I want to do this using a query. Can you tell me how to write this function? Thanks!
Can you please help me? I'm trying to change my data in a field to delete anything after the "-". For example: XXXX-XXX to XXXX. I want to do this using a query. Can you tell me how to write this function? Thanks!
dcx693 Registered User. Local time Today, 10:46 Joined Apr 30, 2003 Messages 3,265 Jan 29, 2004 #2 Use an update query with this as the update to expression: Left([your_field],Instr(1,[your_field],"-")-1) Assuming all entries have a "-" in them. For example: Left("XXXX-XXX",Instr(1,"XXXX-XXX","-")-1) yields "XXXX"
Use an update query with this as the update to expression: Left([your_field],Instr(1,[your_field],"-")-1) Assuming all entries have a "-" in them. For example: Left("XXXX-XXX",Instr(1,"XXXX-XXX","-")-1) yields "XXXX"
Mile-O Back once again... Local time Today, 15:46 Joined Dec 10, 2002 Messages 11,316 Jan 29, 2004 #3 UPDATE MyTable SET [MyField] = Left([MyField], 4) WHERE Len([MyField]) > 4;
C cstuckey Registered User. Local time Today, 15:46 Joined Mar 6, 2000 Messages 23 Jan 29, 2004 #4 Thank you! It worked. Chris