SQL Help Writing an Update Query?
-
I've got a table named Customers in Database Access. I want to Update one of my fields (Username) to show the first initial of the first name + last name + customer id. I was told something about using a function called CSTR to convert a number to a string, but I don't understand how I'm supposed to fit it in. Can someone help me?
-
Answer:
WRONG! NEVER mix these in one field. It totally destroys the effectiveness of the database. The rule wit any database is ever single person must have a unique id, This should be an autonumber primary key. Name should be held in different fields for first names and last name. Ideally you should also include something else with the name as a unique key as well, otherwise you will have confusion when you get multiple John Smith entries. Far better to use maybe their email address as the unique key, this can NOT be duplicated. In any case if you break the fields apart it allows for corrections to spelling without breaking the consistency of the data (making the names the key field will lead to data corruption if this needed to be done) and for changes of name, as when someone gets married. You then use your forms and reports to display the information in any way you like without breaking the system.
Cincinnati Cypher at Yahoo! Answers Visit the source
Other answers
WRONG! NEVER mix these in one field. It totally destroys the effectiveness of the database. The rule wit any database is ever single person must have a unique id, This should be an autonumber primary key. Name should be held in different fields for first names and last name. Ideally you should also include something else with the name as a unique key as well, otherwise you will have confusion when you get multiple John Smith entries. Far better to use maybe their email address as the unique key, this can NOT be duplicated. In any case if you break the fields apart it allows for corrections to spelling without breaking the consistency of the data (making the names the key field will lead to data corruption if this needed to be done) and for changes of name, as when someone gets married. You then use your forms and reports to display the information in any way you like without breaking the system.
Colinc
Related Q & A:
- How to convert sql query to Hibernate Criteria query?Best solution by Stack Overflow
- I need help writing an objective for my resume.Best solution by resume-help.org
- Help Writing a CV?Best solution by Yahoo! Answers
- Help writing a cover letter?Best solution by resume-help.org
- I really need some help writing my personal statement for a nursing program.Best solution by cmu.edu
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.