Search results

  1. J

    Calculate average length of buying

    Thanks. This should work! Cheers
  2. J

    Calculate average length of buying

    Hi stopher/jdraw, Just to explain this a bit better. Earlier, I explained that you need to ignore the product. I simply need to calculate the average of length of payments on consecutive months no matter of which product was sold. Also, I don't want to see how often they are paying but for...
  3. J

    Calculate average length of buying

    Here, I am looking at payments and how long each customer is staying based on their payments throughout their life cycle. The purchase_amount describes the payment made on that date.
  4. J

    Calculate average length of buying

    Dont worry about the product and the different brands. My boss wants to have an overall idea about the purchasing behavior for each customer. If I have methodology to solve this one here, then I can work around another time and drill this down for different brands. As for the invoices, these...
  5. J

    Calculate average length of buying

    No, but I can append this easily. So, if you have a solution based on auto number, then - yes - consider this too.
  6. J

    Calculate average length of buying

    Hi all, I have a problem to calculate the average length of buying any product for each customer. The way that I need to calculate this is to find the length based on payments for consecutive months. For example, I have a table called tbl.transactions with the following fields. For a customer...
  7. J

    Need a outer join query for dates

    Hello, I have a big table with different dates and some customerids. For example, date, customerid 01/10/2016, 100001 05/09/2015, 100001 03/06/2013, 100001 01/10/2016, 100002 05/09/2015, 100002 05/09/2015, 100003 03/06/2013, 100004 03/06/2013, 100005 The sequence of dates is random, so there...
  8. J

    Count by Date, Month and Year in one Query

    What about using format function? So, you will have format(field, "dd") for day, format(field, "mm") for month and format(field, "yy") for year.
  9. J

    Average time between purchase orders

    ahhhh....so simple solution!!! sneuberg, I like your solution. Thanks a lot everyone! Just out of curiosity, if I want to work on yearly averages, should it be based on the min date of the corresponding year and the max of any year?
  10. J

    Average time between purchase orders

    Hi, As explained above, these were just random numbers for the purposes of this example. However, if I have to give the real averages (in case someone is confused from my example), then I would expect to get the following for all years: customerid avg_time_between_orders_in_months 1111111...
  11. J

    Average time between purchase orders

    Hi guys, Thanks for the help. Stopher, your are right. However, that was just an example. These are not real figures. I just wrote some random values so that I can raise this query. The purpose is for me to understand the procedure to extract the average time between transactions. arnelgp, If...
  12. J

    Average time between purchase orders

    Hi everyone, I have a small problem for which I have found a partly solution. I have a transactional history of purchases and I'd like to find the average time between purchases for each customer. For example, my table1 looks like this: id customerid order_date 1 1111111 03/02/2011 2...
  13. J

    Merging duplicate rows and combining field values from the duplicates

    If I understand this correctly, I would suggest you follow these steps: 1) sort the data, 2) create a column and give group numbers for the duplicate records, 3) create another column and concatenate the text fields by using the group numbers (e.g. an IIf() function should work) 4) Copy the...
  14. J

    Compare strings

    As explained above, the StrComp function is the one that I already used, but I noticed that what I did is that had omitted initially the comparison statement. If I make a textual comparison (eg. argument is 1), then I get the same results while the binary one (e.g. argument is 0) will give me...
  15. J

    Compare strings

    Hello, I have two cases here with Strcomp function and I'll need your help. When I compare two strings using the above function, I get values as 0, 1, -1. 1) My first case is for the 0 values. I can normally get this even if I have two strings which ones is lower case and the other proper...
  16. J

    Problem with Compacting

    Hi, I have an Access file which is around 1.2GB of size. The version that I am using is 2010 Access. I have a database that I imported it from a csv file with no issues. Once I simply run an update query or any query that modifies the data and, then, try to compact/repair the whole file, then...
  17. J

    Clean first names

    CJ_London, The queries you gave me worked to a large extent. Thanks a lot. I also made some improvements based on some extra scenarios. There are 1-2 things that I am still struggling. The first one is how would you modify the query if you have a name, let say, "Jonathan J. Peter". How can I...
  18. J

    Can't find blank records after replace function

    Cool...I used this one and it worked! UPDATE test SET test.title=NULL WHERE (((test.title)="N/A")); Thanks!
  19. J

    Can't find blank records after replace function

    Hi, Probably, this is something silly, but I need to understand how to solve this. I have a title field for which I wanted to replace all the "N/A" to null. I used the replace function as =replace(title,"N/A",""). This made those records as null (as expected). However, if I run a selection...
  20. J

    Clean first names

    Thanks...I'll see if it works
Top Bottom