Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return String up to space

Status
Not open for further replies.

apug

Technical User
Aug 2, 2006
6
US
I have a table with a [user] column. The format is UserName - NTLogin. I need to run a query that only returns the UserName up to the space. UserName is of varying string lengths.
 
Code:
Select Left([User], Instr(1,[User]," ")-1) As [UserName],
 
Golom This worked great. Thank you. I haven't seen this before. What is the "Instr" function?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top