Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Hinfer

    Export crosstab with no row indent to Excel (no empty columns)

    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...
  2. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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...
  3. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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")...
  4. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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: ...
  5. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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...
  6. Hinfer

    Calculating the date difference in working days

    Similiar thread here: http://www.tek-tips.com/viewthread.cfm?qid=755057
  7. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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.
  8. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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...
  9. Hinfer

    Union Query syntax problem (alias issue?)

    Thanks again. (I should have tried that - d'oh)
  10. Hinfer

    Union Query syntax problem (alias issue?)

    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...
  11. Hinfer

    If Else in Query

    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
  12. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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...
  13. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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!
  14. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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...
  15. Hinfer

    Query a column based on date ranges in another table (cross-tab?)

    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...
  16. Hinfer

    Finding records that DO NOT exist

    A star for you! That is one easy and simple solution! Thanks alot
  17. Hinfer

    Finding records that do not exist

    hilfy, I have done a left outer join but in doing so, it will only return Jack. It should also return Jill since she doesn't have a FIRE certificate (but has a GAS certificate) I think I have to do two queries, one to find who has the certificate and another that takes the results of the...
  18. Hinfer

    Finding records that do not exist

    I am using crystal 8.5 and need to find persons where a record does not exist. I have two tables, person table and a certificates table. I need to find persons where a certificate does not exist for that person. The certificates table creates records when the person has acquired a...
  19. Hinfer

    Finding records that DO NOT exist

    GJParker, I have done a left outer join but in doing so, it will return John and Jill. It should not return John since John has a FIRE certificate. It is returning John because he has two other certificates that does not equal FIRE. I have to do two queries, one to find who has the...
  20. Hinfer

    Finding records that DO NOT exist

    I am using crystal 8.5 and need to find persons where a record does not exist. I have two tables, person table and a certificates table. I need to find persons where a certificate does not exist for that person. The certificates table creates records when the person has acquired a...

Part and Inventory Search

Back
Top