473,326 Members | 2,680 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,326 software developers and data experts.

Reverse display order of names

Hi,
I have a filed name called OwnerName where I typed in the persons first
name then surname. I now have a need to display the surmane first then
surname. Is there a way of reversing the order that the OwnerName is
displayed.
Maybe through a query or something

Thanks
Denis

Jan 16 '07 #1
1 3807
On 16 Jan 2007 12:10:55 -0800, Denis wrote:
Hi,

I have a filed name called OwnerName where I typed in the persons first
name then surname. I now have a need to display the surmane first then
surname. Is there a way of reversing the order that the OwnerName is
displayed.
Maybe through a query or something

Thanks
Denis
So now you have the results of incorrect database design.
The FirstName should be in a field all by itself.
Same with the LastName as well as any MiddleName/Initial.
It is very easy to put the two names together, but it can be rather
difficult to separate them.

It all depends upon how the names in the OwnerName field are entered.
If ALL of the names are in FirstName space LastName order (John Smith)
then you can use:

NewNameOrder:Mid([OwnerName],InStr([OwnerName]," ")+1) & ", " &
Left([OwnerName],InStr([OwnerName]," ")-1)

Will result in "Smith, John"

The above will fail if the [OwnerName] includes a middle name or
initial, i.e. Robert Louis Stevenson, or John J. Smith.

A wiser move would be to separate completely in your table the first
and last names.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jan 16 '07 #2

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

Similar topics

14
by: Erik Andersson | last post by:
Hi! I need to read a file (line-by-line) in reverse order, without reading the whole file into memory first. Is there an easy way of doing this? As in, is there a PHP function I could use? ...
9
by: frizzle | last post by:
Hi there, Short question: Is there any way, to reverse the result of a mysql query? Explanation: If i have eg. 20 records, all with their own id of course, select 5 with limit, and order...
35
by: Raymond Hettinger | last post by:
Here is a discussion draft of a potential PEP. The ideas grew out of the discussion on pep-284. Comments are invited. Dart throwing is optional. Raymond Hettinger ...
3
by: James Lee | last post by:
I am doing a simple query like col1, col2, date, col4 from table1. All four colums are of type blob. For date column, I store a string like this: Fri Feb 13 11:01:24 2004 I store records as...
3
by: R. Rajesh Jeba Anbiah | last post by:
Unfortunately, I couldn't find any way to traverse the object array in reverse order. I'd thought there must be a way to do it with for..in loop, but couldn't find anything yet. Could someone...
14
by: ford_desperado | last post by:
Why isn't ALLOW REVERSE SCANS the default? Why do we have to - drop PK - create an index - recreate PK What are the advantages of indexes that do not allow reverse scans?
1
by: | last post by:
Hi, I have a listbox called lstFolders. I select the folder names from a database and return them in ascending order. However, when I do the listbox.items.insert(0, new instance) method, the...
0
by: David Laub | last post by:
When I bind a collection to a DataGrid (with teh single statement DataBind), I love that the property names become the column names/values for the grid. But I HATE that the columns are (seemingly?)...
10
by: aatish19 | last post by:
1: Write a program that asks the user to input an integer value and print it in a reverse order Sample Output Enter any number 65564 Reverse of 65564 is 46556 2: Write a program that takes a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.