473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need to change LASTNAME, FIRSTNAME MI to FirstName M. LastName

I used to have a function that would change data that came across as
LASTNAME, FIRSTNAME MI to FirstName M. LastName with an update query.
Does that sould familar to anyone?

Thanks in advance,
Laura

Nov 13 '05 #1
2 3791

musicloverlch wrote:
I used to have a function that would change data that came across as
LASTNAME, FIRSTNAME MI to FirstName M. LastName with an update query.
Does that sould familar to anyone?

Thanks in advance,
Laura


Use InStr to find the position of the comma, and then just grab all the
stuff to the left and right of it.
Something along the lines of

1. Find position if comma INSTR(1,",",MyString)
2. Take everything to the left: LEFT$(MyString, INSTR(1,",",MyString)))
3. Take everything to the right: RIGHT$(MyString,
Len(MyString)-INSTR(1,",",MyString)))

Probably not exactly right, but it should get you going in the right
direction.

Nov 13 '05 #2
Thanks so much. Just in case anyone was wondering, this is my formula:

StrConv(Right$([Name],Len([Name])-InStr(1,[Name],",")-1) & " " &
Left$([Name],InStr(1,[Name],",")-1),3)

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sebastian | last post by:
The following query needs about 2 minutes to complete (finding dupes) on a table of about 10000 addresses. Does anyone have an idea on how to speed this up ? Thanks in advance !!! Sebastian
2
by: Roy | last post by:
I am very, very new to ASP.NEt and have never done ASP. I have been trying to get a datagrid to work for about 5 days with very limited results. When I use property builder, bind the control, set...
1
by: Rico | last post by:
Hello, Hope someone can help here, I'm trying to modify the following code to use an automation object so I don't have deal with CRAPPY REFERENCES! The reason being is that this will be going...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
1
by: robinsand | last post by:
I am a new C++ programmer. I am still having trouble with certain data types and constructors, among other things. I'm not sure if I've used "std::string" properly throughout this program. I need...
3
by: Ashton | last post by:
Hello, I have a GridView; once the page is loaded I can sort it just fine, I can sort it as many times as I would like, I can sort any of the columns. After clicking on Search and the...
4
by: =?Utf-8?B?Ym9va2VyQG1ndA==?= | last post by:
Ok, I inherited some code written in vb that is part of a web application. My overall objective is to be able to take multiple names from a "LastName" text box and use those names in my SQL query...
11
by: raylopez99 | last post by:
Keep in mind this is my first compiled SQL program Stored Procedure (SP), copied from a book by Frasier Visual C++.NET in Visual Studio 2005 (Chap12). So far, so theory, except for one bug...
6
by: mohaaron | last post by:
Hello all, I'm not very good with writing regular expressions and need some help with this one. I need to validate an email address which has the full name of the person appended to the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.