Search results

  1. N

    How to subtract values from two fields in two consecutive rows in Access table?

    I didn't mean to offend anybody. Sorry for that. Thanks for your try anyway.
  2. N

    How to subtract values from two fields in two consecutive rows in Access table?

    That's not important. I just took it as an example. It could be 07-01 and 07-02 and 07-03 (so three shifts of line number 7), or whichever other number combination. What is important is that I want to compare shifts from the same line or same vehicle number.
  3. N

    How to subtract values from two fields in two consecutive rows in Access table?

    No, there is nothing defined in the format property of the field in the access database for the field SL.Only I set the data type to be Text.
  4. N

    How to subtract values from two fields in two consecutive rows in Access table?

    The data types of krajkm and pockm are Number. So, in the example above I want to ckeck whether krajkm for 04-01 is less or equal than pockm of 04-02. SL. is of type text.
  5. N

    How to subtract values from two fields in two consecutive rows in Access table?

    THIS IS THE EXAMPLE: So I like to ckeck whether Krajkm for 04-02 (the ending km for second shift of line number 4) is smaller than pockm for 04-03 (the starting km for third shift of the same line number i.e. number 4) i.e. to check and compare cosecutive values for starting and ending km. Thanks
  6. N

    How to subtract values from two fields in two consecutive rows in Access table?

    Hi, I have a table with unique number of vehicle and the shift it works in. There are columns for number of vehicle, shift, starting km and ending km. I want to subtract or only compare the values form the columns ending km and starting km from the consecutive rows depending on the shift. I...
  7. N

    Combining selects in one select in access query

    Ok, can you help me please how to combine into one query these two which work when tested as standalone selects: SELECT MAGACIN.GBR, [@data1] AS Expr1, [@data2] AS Expr2, Sum(IIf([MAGACIN.SIFRA]="0992201",MAGACIN.KOL,0)) AS Addblue, Sum(IIf([MAGACIN.SIFRA]="0999001",MAGACIN.KOL,0)) AS...
  8. N

    Combining selects in one select in access query

    Hello, I have three tables and I use fields from all of them, and aggregate functions to make select for my report. I tried to make separate selects that return separately correct values, but I don't know how to combine them and get one select in the query which I will use for the Crystal...
  9. N

    Sum(iif()) function problem

    The first post from with this title and the one with the images are completely the same and give the same results. And I use the second table Magacin to make the first table using the posted select statement. If you are looking at http://www.access-programmers.co.uk/...d.php?t=218674, don't...
  10. N

    Sum(iif()) function problem

    Here are the both tables. The Gorivo column in the first table which I have made using the posted select statement is Sum(KOL). Kol is the column that should be calculated with sum() in the table MAGACIN which I use in the select.
  11. N

    Sum(iif()) function problem

    From that table only KOL should be calculated. So, CENA,BRMAG and BRNAL are not important so, this is important, this table and the calculation of KOL, depending on SIFRA, DATA, and GBR as I have posted earlier
  12. N

    Sum(iif()) function problem

    As in the second table, I have posted as untitled1.jpg, the sum for Gorivo should be 1202 (it is the sum of column KOL), not 40868 as in my case, in the first table shown in untitled.jpg. So is the case with all other columns where I have sum. Thanks
  13. N

    Sum(iif()) function problem

    Here is the biggining part of the result of the select: And here is the select: SELECT NOVI.GBR, NOVI.AB, Min(IIf(([NALOG1.DATA]>=[@data1]) And ([NALOG1.DATA]<=[@data2]) And ([NALOG1].[POCKM]>0),[NALOG1.POCKM],Null)) AS pockm, Max(IIf(([NALOG1.DATA]>=[@data1]) And...
  14. N

    Sum(iif()) function problem

    I have three tables and they are prety big. In the previous thread I posted only very little segment of the table MAGACIN, but the whole select contains data from all the tables. Here is just short segment of the result of the query. It should look something like this at the end, when running...
  15. N

    Sum(iif()) function problem

    Yes, but I only solved the second part i.e. the second select. So I made a new query with this sql SELECT MAGACIN.GBR, Sum(MAGACIN.KOL) AS SumOfKOL, MAGACIN.SIFRA FROM MAGACIN WHERE (((MAGACIN.DATA) Between #10/1/2011# And #10/31/2011#)) GROUP BY MAGACIN.GBR, MAGACIN.SIFRA HAVING...
  16. N

    Sum(iif()) function problem

    Hi, I have this select SELECT NOVI.GBR, NOVI.AB, Min(IIf(([NALOG1.DATA]>=[@data1]) And ([NALOG1.DATA]<=[@data2]) And ([NALOG1].[POCKM]>0),[NALOG1.POCKM],Null)) AS pockm, Max(IIf(([NALOG1.DATA]>=[@data1]) And ([NALOG1.DATA]<=[@data2]),[NALOG1.KRAJKM],Null)) AS krajkm...
  17. N

    Problem with the sum function in quey select

    I solved it
  18. N

    Problem with the sum function in quey select

    I didn't ignore it but the problem is that whichever fields I choose, even if I chose three columns in the select, (the number of the vehicle and the quantity and the date) Sum(quantity) returns decimal, eventhough all the values in the column for quantities are integer numbers??? SELECT...
  19. N

    Problem with the sum function in quey select

    It is also very strange that while calculation eventhough all the values in the KOL column are integer numbers, the sum calculates decimal number?? very strange
Back
Top Bottom