[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Dato håndtering i SQL



On Thu, 18 Mar 2004 09:52:19 +0100, Dan Mortensen wrote:

> select id, opgavenavn, opgavestart, opgaveslut from fotografbestilling
> where (opgavestart between '2004/03/18 12:00' and '2004/03/18 12:30' or
> opgaveslut between '2004/03/18 12:00' and '2004/03/18 12:30')

[...]

> Det virker sådan set OK, men problemet er jo når der kommer en opgave
> som falder helt uden for disse opgavestart og slut tidspunkter.

Den rare løsning benytter OVERLAPS-funktionen. Prøv at se
http://www.dbmsmag.com/9707d06.html

MySQL ved - ikke overraskende - intet om OVERLAPS mht. tider. Heldigvis
ser det ud til, at artiklen udpensler, hvad OVERLAPS-funktionen
indebærer. Du skal vist blot tilføje en ekstra sammenligning eller to
til dit udtryk.

SQL:2003-standarden udpensler også hvad OVERLAPS gør (afsnit 8.13).

-- 
Greetings from Troels Arvin, Copenhagen, Denmark



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *