Image According to EmployeeID

mohammadagul

PrinceAtif
Local time
Today, 20:00
Joined
Mar 14, 2004
Messages
298
Hello friends,
I have been designing a human resource database a company, presently my employer had informed me that he had the pictures of the employees stored in local hard disk.

I am not saving the picture in my forms, just only putting the path of the file from one table (Pictures) in the other (Employees). But the records are too many. Almost 7000 employees. So it is taking to much time to update the database. I decided to use an update query to update all my records at one from the picture table

Table: tblemployees
Employeeid: Autonumber
PicturePath : Text
PictureName : text

Table: pictures
Pictureid : Autonumber
Picturepath: text
Picturename : text

What I did was that I changed the name of all the pictures in PictureName field in picture table to same as the employee field employee table

So Picturename = employeeID

But the EmployeeID (Autonumber are in ascending order where as the picture name [from picture table are neither ascending nor descending there is no sorting of any kind. Further mo0re the picture path is also different for many pictures

I tried usign the update table query with the following SQL

Update Pictures [, tblemployees set tblEmployees.picturename = [pictures].[picturename
Where (((tblEmployees.PictureName) = “EmployeeID”));

This query is not working

What I wanted was the query should check the Picture name in the Picture table and then compare it with the EmployeeId in the tblEmployee. If Picture name were same as the employeeId then it would update my tblEmployees with the corresponding Picturename.
 
Employeeid is Numeric, why have you surrounded it with quotes in your statement?
 
the sql statment is not accepting the statement without quotes
 
hello friends
i really need to do this today. if you need tht i should post a demo please say so. i will log on after few hours and post the db. in the mean time fi any one could suggest somthing.. it would be highly appretiated
 

Users who are viewing this thread

Back
Top Bottom