Search results

  1. recyan

    Working out if/when co-occurence, erm, occurs

    Can you elaborate on "the start time of this and the end time". In case, you have not looked in to, take a look at aggregate queries (GROUP BY). If possible, post a few dummy data & the result you want out of it. Thanks
  2. recyan

    How to calculate total time duration

    Till someone comes along, just check if below gives some guidelines : SELECT myTable.staffid, myTable.TheDate, Sum(DateDiff("h",[timeIn],[timeOut])/8) AS TheTotalDurationDividedBy8 FROM myTable GROUP BY myTable.staffid, myTable.TheDate; Thanks
  3. recyan

    Finding Financial year from set of two dates

    just check out if below gives some guidelines ( rather crude way :(): SELECT a.MinOfTheDates, a.MaxOfTheDates, Month([MinOfTheDates]) AS TheMonthOfMinOfTheDatesDate, IIf([TheMonthOfMinOfTheDatesDate]<4,Year([MinOfTheDates])-1,Year([MinOfTheDates])) AS TheStartFinancialYear...
  4. recyan

    How to avoid Cartesian Joins

    1) In the QUBE table, perhaps, the bookingid along with some other field/s must be unique. 2) If 1) is the case, then, do your other tables also have similar fields ? 4) think, if you post your tables with some dummy data & the resultant data that you want your query to give, perhaps someone...
  5. recyan

    How to avoid Cartesian Joins

    Till someone comes along, a bit of loud thinking : 1) You mentioned 3 tables, there appears to be only 2 tables in the SQL query posted, QUBE and CAR TAR. 2) When you say, there are no primary columns in the tables, assume, bookingid is not unique, in either of the tables. 3) Is it possible to...
  6. recyan

    split delimited field into different rows

    Is there going to be not more than 3 colors or is the max number not known ? Is this a one time operation ? 1) If yes, perhaps, you could export to Excel & then use the Text To Columns feature & then import it back in to a table ? 2) perhaps, use VBA, to loop thro & split each field, then...
  7. recyan

    Text search in access database-find the exactly matched word(s)

    John has given the guidelines. We just need to look in to it. Just check out below : Like "* Apple." TheText Like "*pineapple*" And TheText Like "* apple*" Do the examples that you have provided, cover every thing that the fields will throw up ? Thanks
  8. recyan

    Identifying Days per month from Date Range

    In addition to jdraw's suggestion, perhaps, another alternative, Assumption : 1) A tbltemp table exists or is created on the fly in the VBA code. 2) If the tblTemp exists, the code will delete all the records present in it before proceeding The pseudo VBA function to poulate the tblTemp ...
  9. recyan

    Identifying Days per month from Date Range

    Just check out if below gives some guidelines : To take care of Public Holidays also, There is an holidays table tblHolidays, which has the Public Holidays listed tblHolidays - HolidayID - PK - Autonumber, HolidayDate - Unique - Date Field, HolidayName - Text Field Save below function ...
  10. recyan

    Help with a simple query

    As a start : SELECT ID, FirstName, Email FROM Table1 WHERE Email Is Null; Thanks
  11. recyan

    Identifying Days per month from Date Range

    That complicates things a bit. Again jdraw has already given us the hint "Working Days". We have a AbsentStartDate AbsentEndDate Possible Cases : 1) Both the dates lie within the same month 2) The StartDate & EndDate are in different months Case 1 : We can use the Working day function...
  12. recyan

    Identifying Days per month from Date Range

    Thinking along jdraw's suggestion, just check out if below gives some idea : SELECT myTable.EmpID, myTable.AbsentStartDate, myTable.AbsentEndDate, Month([AbsentStartDate]) AS MontOfAbsentStartDate, Month([AbsentEndDate]) AS MontOfAbsentEndDate...
  13. recyan

    Query or Report not sure where to go.

    Just check out if below gives some guidelines : The sub-query to be saved : qryRaceGenderTitle_TitleCount SELECT tblEmpJobTitles.JobTitle, [EmployeeRace] & " " & [EmployeeGender] AS EmpRaceGender, Count(tblEmpJobTitles.JobTitle) AS CountOfJobTitle FROM tblEmployees RIGHT JOIN...
  14. recyan

    Removing specific duplicates from query

    I understand. This happens with me too, most of the times.:D Thanks:)
  15. recyan

    Removing specific duplicates from query

    Have you tried something like : SELECT Key, Grade, Rate, Country, MAX(Code) AS TheCode FROM ... GROUP BY Key, Grade, Rate, Country Thanks
  16. recyan

    Counting number of vessels for each month

    Just take care to open the queries in SQL view, when you are checking them, as there are some odd joins (I suppose you are already aware of that, but just in case). Best of Luck with your project. Thanks :)
  17. recyan

    Counting number of vessels for each month

    Had tried something similar to what you want ( I think so). It's rather a longish way, but all the same, see if it gives you some guidelines. Just open the form in the attached db. Thanks
  18. recyan

    2 queries 2 different results

    Hi, Based on your first post, are you looking for 127009 records in the results of the join query. If that is the case, have you tried using the 11CTYTotal query on the Left hand side of the join, Try something like below in the query builder design grid & see how it goes, 11CTYTotal...
  19. recyan

    What's your best/worst joke?

    That's not fair, Rabbie, but all the same it's a beauty.:D
  20. recyan

    Adding more fields to a Union Query

    A small question, Based on the data that you have provided, and the query used you have shown the result Should this result not be Serial 1 2 3 4 5 6 7 8 9 10 11 12 Thanks
Back
Top Bottom