Jun 5, 2006 #1 Noah114 Technical User Mar 31, 2005 59 US I have fields in a database the I wished shorten to a short name version. In other words: Enbrel 25mg to Enbrel Enbrel 50mg to Enbrel Tracleer 50mg to Tracleer Is their a function?
I have fields in a database the I wished shorten to a short name version. In other words: Enbrel 25mg to Enbrel Enbrel 50mg to Enbrel Tracleer 50mg to Tracleer Is their a function?
Jun 5, 2006 #2 lespaul Programmer Feb 4, 2002 7,083 US if there is always a space after the name you want, the something like: SELECT MID(FIeldName, 1, Position(' ', FieldName)) I don't think I've got the syntax exactly right though...... should give you the idea though. Leslie Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual Essential reading for anyone working with databases: The Fundamentals of Relational Database Design Upvote 0 Downvote
if there is always a space after the name you want, the something like: SELECT MID(FIeldName, 1, Position(' ', FieldName)) I don't think I've got the syntax exactly right though...... should give you the idea though. Leslie Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
Jun 5, 2006 #3 Melagan MIS Nov 24, 2004 443 US This might work if all of your fields are formatted the same way: "DataYouWant [SPACE] DataYouDon'tWant" Left([YourField], Instr([YourField], " ")) ~Melagan ______ "It's never too late to become what you might have been. Upvote 0 Downvote
This might work if all of your fields are formatted the same way: "DataYouWant [SPACE] DataYouDon'tWant" Left([YourField], Instr([YourField], " ")) ~Melagan ______ "It's never too late to become what you might have been.
Jun 5, 2006 #4 lespaul Programmer Feb 4, 2002 7,083 US InStr - that's the function I was trying to think of!! Pathetic how you forget the little things when you don't use them much! les Upvote 0 Downvote
InStr - that's the function I was trying to think of!! Pathetic how you forget the little things when you don't use them much! les