This thread is related to thread149-1402780. I had a problem of exporting an Cross-tab report to excel and did not want the export to excel data only option (since I had some cells highlighted in different colors and wanted to retain the cell formatting). I found that if you right-click on the...
OK I have had misinterpreted the end date for the position table. It turns out their is no end date for each position!! In fact, the date I used is a union exit date (which I don't care about).
The end date of the position is defined as one day before the start date of the new position...
oops forgot the "and" afterward...don't worry I have tested it and it works
SELECT AssignmentPositions.Employee, DMax("Store","Assignment","[Employee]="&[Employee]&" and[StartDate]<=#" & Format([StartDate],"d-mmm-yyyy") & "# and ([EndDate]>=#" & Format(NZ([EndDate],[StartDate]),"dd-mmm-yyyy")...
Alright! I think I got it. I think I should deserve a star for this one (well, most goes to PCLewis) Need to apply another criteria on the DMAX function to equate the employee ids. Need to add addition to DMAX criteria portion of the function:
...
Sorry I have been tired from working on this query. Its my last query out of many that I am working. I am actually doing a data migration from an old system to a new system. There are 100,000 records for this one table and I have simplified the problem just to get the logic and learn from the...
sorry but my assigment table should look like this:
Employee Position StartDate EndDate
1235 Manager-L3 Jan.01/00
No enddate for this person's position. He has been a Manager-L3 ever since he started.
Thanks PHV. This worked.
I have another problem. If I have another employee in the employee and position table, the resulting new tables are:
Position Table
Employee Position StartDate EndDate
1235 Manager Jan.01/00 Mar.01/01
Assignment Table
Employee Store StartDate...
The code below (see code that doesn't work) gives me a error "syntax error in union". Once I click ok it highlight the bracket in ") as Q1".
The strange thing is if I break this query apart then it works. There must be something wrong with my syntax surrounding the aliasing. I would like...
Try this:
switch(
[Cur]="EUR",[Selling Price]*0.6998,
true,[Selling Price]
)
a switch is like a case statement. This does the follwoing
if euro then calculate
else (all other currencies) return selling price
I am getting an error when I try this query. I have formatted the query so that I can understand it better. It appears correct but Access is giving me an error "syntax error in union query". Access highlights the left bracket in ") AS Q1" in the union portion of the query. Would you know...
ANOTHER FOLLOW-UP
I have been thinking about it this solution and I could really use it in another database (Oracle). I think I may try and update some blank fields using this method.
Thanks again PCLewis. I wish I could give you another star!
Thanks for PCLewis. Your guesses are correct. The big gap in Position table between Jun.06/03 and Oct.20/04 was intentional. He was temporarily terminated (payroll stopped - due to schooling). Came back as manager.
Regarding your second inquiry, YES, the big gap from Dec.21/01 to Oct.31/04...
I need a query to populate a column based on criteria in table. The criteria is based on 2 dates. I have 2 tables: employee position table and an assignment table(where the employee is scheduled to work). I need to add another column to the assignment table that displays the person's positon...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.