473,386 Members | 1,745 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,386 software developers and data experts.

Create lower case login from 2 Upper Case Fields

5
Hello

I am using Access97 - workplace requirement.

I want to create a query where I can generate a login field that takes the 1st letter of the 1st field (PREFERRED NAME) and combine it with the entire 2nd field (FAMILY NAME)

eg - JOHN SMITH = jsmith

Thanks
:-Dz
Jun 28 '10 #1

✓ answered by Delerna

Expand|Select|Wrap|Line Numbers
  1. SELECT lcase(left(FirstNameField,1)) & lcase(LastNameField)
  2. FROM TheTable

6 1730
Delerna
1,134 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. SELECT lcase(left(FirstNameField,1)) & lcase(LastNameField)
  2. FROM TheTable
Jun 28 '10 #2
dezzmo
5
Thank You
For my query I typed:
Login: lcase(left(Preferred Name,1)) & lcase(Family Name)

However, I get an error message - "The expression you entered contains an invalid syntax. You may entered an operand without an operator"

And after that, "NAME" in the 'Preferred Name' field is highlighted.
Jun 28 '10 #3
dezzmo
5
I have corrected it - i needed to do....

Login: LCase(left([Preferred Name],1)) & LCase([Family Name])

The extra bracket is needed around the fields due to them having two words.

Thanks for the tip.
:-Dz
Jun 28 '10 #4
dezzmo
5
@dezzmo
Thanks again - i have now been able to do this login at another work place....

John Smith = johnsm

:-D
Jun 30 '10 #5
Delerna
1,134 Expert 1GB
you are welcome

The reason for the error being "due to having 2 words in the field name" is correct but the reason is more ... because there are spaces in the field Name.
The two statements mean the same thing though so it's a bit pedantic

It's one reason I name fields like FirstName rather than First Name.
Other people like First_Name.

Another time you would need the square braces is if the field name was a number or started with a number.
Jun 30 '10 #6
dezzmo
5
That's handy to know. Those 2 word fields with spaces were preset by the organsation in their administration software package - which I am able to tap into to extract data (legitimately!!)

;-Dz
Jul 1 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: programmerforhire | last post by:
Hello all, Is there a way to setup an ms-access table so that when I enter text in the 'datasheet' mode, it will automatically be converted tp upper case. Or must I use a Form for this? rex
9
by: Andy Chalkley | last post by:
Hi I need to convert surname and firstname fields in a table from upper case to normal. There are about 10000 records. Typically: DE ANTONIO De Antonio CONROY, R W AND...
3
by: MHenry | last post by:
All the lower case "c" in my database table are now upper case "C" starting in January 2004. All prior data is fine. I just noticed this after installing a Microsoft update patch a couple of days...
17
by: Janice | last post by:
char* line = "abcd"; How to convert the line to upper case and print? Any option for printf to do this? Thanx
5
by: Mariame | last post by:
Hi Everyone, Is There a way to eliminate upper case, so the user could only write Lower Case or to transfer the Upper Case String to lower case in Visual Basic ???? Thx in Adv.
2
by: A Bruce | last post by:
hello, I am attempting to convert a oracle database to postgresql and I am having some problems creating a constraint across multiple columns which are a mixture of case insensitive and case...
19
by: Eric Lindsay | last post by:
Should HTML 4.01 Strict markup be done in upper case or in lower case? I understand that HTML allows either upper or lower case. I also notice that XHTML apparently requires lower case. However I...
8
by: csanjith | last post by:
Hi, i have a situaion where i need to convert the characters entered in an text field to upper case using C. The configuration id utf8 environment in which user can enter any character (single ,...
14
by: fniles | last post by:
In VB.NET 2005 can I check if a letter in a string is upper case or lower case ? For example: I have the following 2 lines: NQ,Z2003,11/11/2003,1416.5,1420,1402,1411.5...
15
by: pukhton | last post by:
Hi fellows Just a quick question about my database. I have one table in my database which i import it from some other Access db. This table has many fields, such as Initials, Medication name...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.