Search results

  1. recyan

    Field relating two unrelated tables

    The query will display all the CardNos associated with a particular TransactionID. At the same time it will display the other TransactionID's associated with the Cards. For eg. if we query for TransactionID "3", which is specifically a Sell Type Transaction, the query will display all the cards...
  2. recyan

    Field relating two unrelated tables

    1) Is the details I posted in the previous post in line with what you are looking for? 2) The query is expecting you to supply the TransactionID, which it is not getting. Hence the message. Think you need to check your WHERE clause. Thanks
  3. recyan

    Field relating two unrelated tables

    Hi, The tables : tblInventory CardID BuyingTransactionID SellingTransactionID 1 1 3 2 2 4 3 2 4 4 1 3 5 2 3 6 2 4 7 8 tblTransactions TransactionID CustomerID Buy/Sell 1 10 Buy 2 11 Buy 3 12 Sell 4 13...
  4. recyan

    Field relating two unrelated tables

    Ok. Have you tried the query which I have posted in my previous post with & without the where clause? If yes and it did not work, what happened? In this case, the TransactionID itself defines Buy or Sell either by its Buy/Sell value in tblTransactions or by the TransactionID field value in...
  5. recyan

    Field relating two unrelated tables

    Guess after 26 posts in this thread, my thoughts might be repetitive, but all the same : 1) Each Card is unique. 2) Each Transaction is associated with one & only one customer. 3) The Transaction can either be Buy or Sell only, not both. 4) Each Transaction can be associated with one or many...
  6. recyan

    Date query

    Glad you found it helpful. Thanks:)
  7. recyan

    Date query

    just check out if below (pseudo-code) gives some guidelines : SELECT tblOrderDetails.OrderID, tblOrderDetails.OrderDate, tblOrderDetails.Price, tblFactors.DateRangeStart, tblFactors.DateRangeEnd, tblFactors.Factor, tblOrderDetails.Price * tblFactors.Factor AS FactorAppliedPrice...
  8. recyan

    Query to find multiple data with criteria

    One way could perhaps be : 1) A query which finds distinct RiskID's having efficient & then 2) using the wizard to design an UnMatched Query on the table Risks RiskIDs & the query in Step 1 Thanks
  9. recyan

    Merge duplicate valus

    Glad you found it helpful. Hope you don't have 2 or more different persons with the same Last_Name & First_Name. Thanks:)
  10. recyan

    Merge duplicate valus

    just check if below gives some guidelines : First Table to generate : qrytblNames SELECT Min(Table1.ID) AS MinOfID, Table1.Last_Name, Table1.First_Name INTO Table_Names FROM Table1 GROUP BY Table1.Last_Name, Table1.First_Name; Second Table to generate : qryPhoneTable SELECT...
  11. recyan

    Finding first start time and last end time in multiple records

    I really do not know. New here as well. All the same, glad you got things going. But just test things thoroughly. Thanks:)
  12. recyan

    Finding first start time and last end time in multiple records

    Now, I think I have understood, what you want. Just see if below gives some guidelines : The table : tblJobs JobID Worker JobDate JobStartTime Duration_In_Hours Am assuming that Duration_In_Hours has been stored as a decimal (eg: 1, 1.5, 1.25, 1.75, etc). The sub-queries : qryJobEndTime...
  13. recyan

    Finding first start time and last end time in multiple records

    No need for the database. You have not replied about the suggested line of query, whether it will work or not work (if not - why not). Basically what I have understood is : you want the result of the query as below : EmployeeName Date SumOfHoursWorked Fred 1/22/2012 4 Guido...
  14. recyan

    Finding first start time and last end time in multiple records

    Was not able to get how the data is stored in the tables. However, as an example : mytable WorkerName Date Time Duration You can try writing a query that Groups on WorkerName, Date and Sums on Duration. Am a bit puzzled as to why Duration is stored & End time is calculated & not the other...
  15. recyan

    Finding first start time and last end time in multiple records

    How is the working hours data stored in the table/s for Fred? Thanks
  16. recyan

    Help! Monthly Summary Query

    Was wondering, whether we need to further extend it to take care of, for example - overlapping months in Startdate & Lastdate (the OP's data does not reflect this - but just a possibility). eg : table1 ID StartDate LastDate Amount 1 1/17/2012 1/18/2012 600 2 3/26/2012 4/1/2012 700 3 4/2/2012...
  17. recyan

    Selecting top 2 rows of a sorted table for EACH Person ID

    Glad you found it helpful. Thanks:)
  18. recyan

    Selecting top 2 rows of a sorted table for EACH Person ID

    just chk if fiddling around with below, gives some guidelines : SELECT tblDiseases.Disease_ID, tblDiseases.disease_surname, tblDiseases.control_id, tblDiseases.control_surname, tblDiseases.date_diff FROM tblDiseases WHERE (( (tblDiseases.ID) In ( SELECT TOP 2 ID...
  19. recyan

    getting average value of purchases beetwen two dates

    Glad you found it helpful. Thanks
  20. recyan

    getting average value of purchases beetwen two dates

    Just check out if below gives some guidelines : SELECT tblPurchase.Customer_ID ,tblCustomer.customerName ,Avg(tblPurchase.Amount) AS AvgOfAmount FROM tblCustomer INNER JOIN tblPurchase ON tblCustomer.customerID = tblPurchase.Customer_ID WHERE (((tblPurchase.DateOfPurchase) Between...
Back
Top Bottom