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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query - Left up to "-" instead of set Number

Status
Not open for further replies.

shepkrm

Programmer
Jul 29, 2004
38
0
0
US
Hello,

I searched through the FAQ's and keyword search, but could not find an answer...

I am attempting to create an update query that takes value from a table that looks like "DATA DATA DATA - data information" and only keep the pieces before the "-". (DATA DATA DATA) There is not a set number of characters before the -.

Has anyone found a function that could complete this task?

I appreciate your help!!
Becky
 
shepkrm said:
"DATA DATA DATA - data information"

It this is data that is in one column have a look at INSTR function. It could be used in combination with the LEFT function to get the data you need.
 
Code:
left (DATA DATA DATA - data information,instr("DATA DATA DATA - data information","-")-1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top