Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Select/Insert help!!!

Status
Not open for further replies.

Goomba79

Programmer
Jul 25, 2012
3
GB
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
 
Apparently you want to create an Update query.
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
 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top