By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,566 Members | 1,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,566 IT Pros & Developers. It's quick & easy.

Table Updating issue

Jerry Maiapu
100+
P: 259
Ok I have this table:Trialdate and query: Absentdays.

Now I want to update column values of table Trialdate from column values of Absentdays Where the dates are equal.

So far this is what I did but could not get any further than that..

Expand|Select|Wrap|Line Numbers
  1. UPDATE Trialdate 
  2. SET CLockin =Absentdays.TimeIn
  3. FROM  Absentdays
  4. Where Trialdate.InsertedDates=Absentdays.DateWorked;
  5.  
I am prompt with "Syntax Error (Missing operator)"

Is there any other better way of going around this?
Or am I missing something?

I have tried many options so far and this is last before actually looking at other options like.. using recordset in VB.. I just want to confine it to Query level..
Aug 5 '10 #1

✓ answered by Jerry Maiapu

I found out myself but if someone has tried to assist then i appreciate your concerns..

Expand|Select|Wrap|Line Numbers
  1. SELECT Trialdate.InsertedDates, 
  2. IIf(IsNull([TimeIn]),"Absent",[TimeIn]) AS ClockIn,
  3. IIf(IsNull([TimeOut]),"Absent",[TimeOut]) AS ClockOuts
  4. FROM Trialdate
  5. LEFT JOIN Absentdays
  6. ON Trialdate.InsertedDates = Absentdays.DateWorked
  7. WHERE ((Weekday([InsertedDates],2)<6));'filter to display b/hours only
  8.  

Share this Question
Share on Google+
1 Reply


Jerry Maiapu
100+
P: 259
I found out myself but if someone has tried to assist then i appreciate your concerns..

Expand|Select|Wrap|Line Numbers
  1. SELECT Trialdate.InsertedDates, 
  2. IIf(IsNull([TimeIn]),"Absent",[TimeIn]) AS ClockIn,
  3. IIf(IsNull([TimeOut]),"Absent",[TimeOut]) AS ClockOuts
  4. FROM Trialdate
  5. LEFT JOIN Absentdays
  6. ON Trialdate.InsertedDates = Absentdays.DateWorked
  7. WHERE ((Weekday([InsertedDates],2)<6));'filter to display b/hours only
  8.  
Aug 5 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.