More Using MS Access Answers
Question Library
Ask a question about Using MS Access
Volunteer
Experts of the Month
Expert Login
Awards
About Us
Tell friends
Link to Us
Disclaimer
|
| |
|
|
| |
| | | |
About Sayedaziz
Expertise database designing,event driven programming,capturing/updating data programmitically using ms access 2000 and ms access 2002
Experience 12 yrs. as a vb programmer
Organizations Print Media
Publications Math Skill Test VB6 Game Source Code published at Planet-Source
---------------------------------------------------------------
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=72322&lngWId=1
Holy Quran Source Code published at Planet-Source
-------------------------------------------------
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=72343&txtForceRefresh=82020091635140766
Right to Left Treeview & Listview Source Code published at Planet-Source
------------------------------------------------------------------------
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=72376&lngWId=1
Education/Credentials B.Com, AICWA (Associate member of Cost & Works Accountants Of India)
| | |
| |
You are here: Experts > Computing/Technology > Business Software > Using MS Access > function for my query
Expert: Sayedaziz - 11/2/2009
Question
I am sending you an image of my present query. You will notice that I have rows for ZONE "5+7" and DAY "Mon" at the top and bottom. The time of top rows under TS column is earlier than bottom rows' time. Actually, the top rows are for "sunday" but in my data it is "Mon". I need a function to change the DAY or DATE of these top row to one day earlier i.e, I would like to change the DAY to "Sun". Could you please help me about this.
Answer Run 2 update queries as follows :
To change date 1 day earlier:
=============================
UPDATE urtbl SET urtbl.[Date] = urtbl.Date-1;
To change day corresponding to the date as updated in above update query
=========================================================================
UPDATE urtbl INNER JOIN urtbl AS urtbl_1 ON urtbl.Id = urtbl_1.Id SET urtbl.[Day] = WeekdayName(Weekday(urtbl.Date))
WHERE (((urtbl.Id)=[urtbl_1].[id]));
Add to this Answer Ask a Question
|
|