Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have found your site brilliant. What makes it good are the people that contribute to the site..."

Geography

Where in the world do Tek-Tips members come from?
Goomba79 (Programmer)
25 Jul 12 6:19
Hello!

I am pretty new to SQL so I imagine my problem is extremely simple!

What I am trying to do is select values in the columns Fname and Sname and insert them in to the column Uname Where the selected empNo emp = empno.
i'm hoping this will run through every entry in my table.

my query so for looks like this...

Select SRuser.Fname, SRuser.Sname As Myname, SRUser.EmpNo as Emp
Insert Myname Into SRuser (Uname)
Where EmpNo = Emp;

If anyone could give me any pointers to how to do this I would greatly appreciate it!

Thanks in advance,

Iain
dhookom (Programmer)
26 Jul 12 0:16
Apparently you want to create an Update query.

CODE --> SQL

UPDATE [YourTableNameHere]
SET [YourFieldNameHere] = [Some Expression Here]
WHERE [AnotherFieldHere] = [Another Expression Here] 
Consider using the query designer interface to build queries until you are more familiar with the syntax.

Duane
Hook'D on Access
MS Access MVP

simian336 (Programmer)
26 Jul 12 8:45
Is this 2 different tables or one table.

Simi
Goomba79 (Programmer)
26 Jul 12 8:49
Hello,
yeah it was an update statement that i needed!
It's the same table that i am taking the data from and putting it into
dhookom (Programmer)
26 Jul 12 9:49
I should have also questioned why you need to store a value that can easily be calculated. Typically this is not good practice.

Duane
Hook'D on Access
MS Access MVP

Goomba79 (Programmer)
26 Jul 12 9:57
i cut and pasted all the employee names from excell into my table, Fname and Sname i wanted their full name to be their username Uname

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close