My Assistant
![]() ![]() |
|
|
May 30 2012, 03:59 PM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 70 |
Hello, I have three tables, "Employees", "Salary" and "TimeTable"
Employees table: http://img418.yukle.tc/images/4541Employees.jpg Employyes table design: http://img418.yukle.tc/images/838EmployeesDesign.jpg Salary table: http://img418.yukle.tc/images/5609Salary.jpg Salary table design: http://img418.yukle.tc/images/2617SalaryDesign.jpg TimeTable table: http://img418.yukle.tc/images/5794TimeTable.jpg TimeTable table design: http://img418.yukle.tc/images/562TimeTableDesign.jpg Relationships between tables: http://img418.yukle.tc/images/732Relationships.jpg Now, I want to create a query that shows me smth like this: 01.01.2012 Bruce Wills 10000 01.01.2012 Brad Pitt 5000 01.01.2012 Paris HIlton 13000 02.01.2012 Bruce Wills 12000 02.01.2012 Brad Pitt 15000 02.01.2012 Paris HIlton 4000 etc. but, the query I created gave me this: (IMG:http://s57.radikal[bad site]/i158/1205/8e/8e46c8915993.jpg) |
|
|
|
May 30 2012, 04:36 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 9,288 From: Wisconsin |
REGISTAN,
Can you re-post your question using text instead of links to images? Dennis |
|
|
|
May 31 2012, 11:30 AM
Post
#3
|
|
|
UtterAccess Enthusiast Posts: 70 |
OK, I have two employees, John and Jack, on 1st January John's salary was $100 per hour, Jack's was $120, on 2nd Jamuary, John has $150 per hour, Jack has $200. Now, in their timetables I want to see salaries by day, if their salary was $100, it should give me $100, if $150, $150. Now, it's showing me smth like this: 01.01.2012 John $100, 01.01.2012 John $120, 02.01.2012 John $100, 02.01.2012 John $120 etc. Hope you got me
|
|
|
|
May 31 2012, 11:41 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 6,170 From: Bethesda, MD USA |
Are you familiar with a Crosstab Query? Try using the Crosstab Wizard and use the Employe as the Row Heading, the Date as the Column Heading and the Salary as the Value and choose First as the funtion for this too.
|
|
|
|
May 31 2012, 11:55 AM
Post
#5
|
|
|
UtterAccess Enthusiast Posts: 70 |
No, I don't want crosstab query, even if I create a crosstab query, the problem is, how can I create a relationship between dates? In one table I have:
John $100 01.01.2012 <= This date means that John has $100/hour from 01.01.2012 till the next date (here it's 02.01.2012) John $150 02.01.2012 <= From this date on John has $150/hour salary Jack $120 01.01.2012 Jack $200 02.01.2012 and another table I have shows that: 01.01.2012 John worked 02.01.2012 John didn't work 01.01.2012 Jack worked 02.01.2012 Jack worked now, I want to create a query that shows: 01.01.2012 John worked $100 02.01.2012 John didn't work $150 01.01.2012 Jack worked $120 02.01.2012 Jack worked $200 Sorry for poor english. (IMG:style_emoticons/default/frown.gif) |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 02:48 PM |