THis question has been up at least three times within the last couple of days and all users have ALSO been created within the last couple of days. Try asking Kim for an answer http://www.eksperten.dk/spm/359881
overmind, or is it Kim? Just a thought! What your asking is very likley possible but if this is a school project then your not going to learn ANYTHING if we do this for you. Next, it seems you havent learnt much at school :o) Where is the primary key for example? If the dates are NOT in Ascendig order then it is not possible to find the next record, which IS necessary, unless you have a primary key or something so we can put the records in order!
Jeg kan godt se at nogen har udnyttet det her sted samt jeres tid, men som en anden skrev er vi en hel skole som har fået stillet en opgave. Og NEJ jeg er ikke den samme! Så kan nogen hjælpe eller ej?! Det er vel derfor vi er her inde, ik?
What do you mean Remove date1? Th problem is that you want to show the NEXT date in column two IF ther is one and in th ecase of the LAST date you repeat it, IKKE?
I'll tell you what I will do, which is just to make sure I dont waste more time! I'll make a solution and BEFORE I place it here then you can give the points. Take it or leave it :o)
SELECT A1.AnnonceNr, A1.Dato, Nz((select TOP 1 Dato from Annoncer A2 WHERE A2.AnnonceNr > A1.AnnonceNr),[A1]![Dato]) AS NextDate, DateDiff("d",[dato],[NextDate]) AS Elapsed FROM Annoncer AS A1;
Have you learnt ANYTHING about normalizing your dB?
One of the reasons for this is to eliminate this:
Overskrift Mercedes benz til salg Mercedes Benz til salg Mercedes Benz til salg
Anyway, this should help although it DOESNT have many records with values >0
SELECT A1.AnnonceNr, A1.Overskrift, A1.Dato, Nz((select TOP 1 Dato from Annoncer A2 WHERE A1.overskrift = A2.overskrift AND A2.AnnonceNr > A1.AnnonceNr),[A1]![Dato]) AS NextDate, DateDiff("d",[dato],[NextDate]) AS Elapsed FROM Annoncer AS A1;
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.