Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 access substing left of comma?

Author  Topic 

pyrrhus_finch
Yak Posting Veteran

51 Posts

Posted - 2004-10-22 : 14:55:32
What is the Access function for fetching the all the characters before a comma in a field.

column has
name
jones,bob
mcgeee,sam

and i want to get
jones
mcgeee
etc...


seems like this would have been posted but couldn't find it anyplace.
thanks.

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-10-22 : 14:58:11
left(name,instr(1,name,","))

it may be:
left(name,instr(1,name,",")-1)

you may also need to check the parameter order of instr()


Corey
Go to Top of Page

pyrrhus_finch
Yak Posting Veteran

51 Posts

Posted - 2004-10-22 : 15:08:37
Thanks. Perfect!
Go to Top of Page
   

- Advertisement -