combine info from same table (1 Viewer)

PARSO

Registered User.
Local time
Today, 05:08
Joined
Dec 13, 2004
Messages
66
Hi

i have a table which contains:
Forename
Surname
Username

I would like to take forename and surname and but the results into a third column called Username.

so in the surname field it would be somthing like: Joe.Bloggs (as the username)

how to i go about doing this?

Thanks in advance
 

pdx_man

Just trying to help
Local time
Today, 05:08
Joined
Jan 23, 2001
Messages
1,347
If Username is to be a calculated field, then do not store it. Just alias to calculation in a VIEW, then reference it where you would your table.
Code:
Create View YourView AS

SELECT
  Forname,
  Surname,
  Forname + '.' + Surname AS Username
FROM YourTable
But, if you absolutely want to:

UPDATE YourTable
SET Username = Forname + '.' + Surname
 

Users who are viewing this thread

Top Bottom