Oleg_123 at xuppa.com
Oleg_123 at xuppa.com
Wed Feb 25 10:05:30 CST 2004
Hi Gustav, i need a count, not a sum :--) when i am trying count this way -- i just get a same number in both columns. I don't think Union Query would work here SELECT Count((Not IsNull(FileToSupervisor))) AS CheckedID, Count((IsNull(FileToSupervisor))) AS NotCheckedID FROM [Ron Data mid AP] WHERE (((Date()-[MS Date Opened])<149)); > Hi Oleg > > How about this: > > SELECT > Sum(ID * Abs(Not IsNull(FileToSupervisor))) AS CheckedID, > Sum(ID * Abs(IsNull(FileToSupervisor))) AS NotCheckedID > FROM > [Ron Data mid AP] > WHERE > (Date() - [MS Date Opened] < 149); > > /gustav > > >> Is it possible for one query to count how many records are up to 150 >> days old and have been chechked and the ones that haven't ? I >> understand how to do in 2 queris, i am wondering if its possible to do >> in one > >> thanks, >> Oleg > >> SELECT Count([Ron Data mid AP].ID) AS CountOfID >> FROM [Ron Data mid AP] >> WHERE (((Date()-[Ron Data mid AP].[MS Date Opened])<149))AND (([Ron >> Data mid AP].FileToSupervisor) Is not Null)); > >> SELECT Count([Ron Data mid AP].ID) AS CountOfID >> FROM [Ron Data mid AP] >> WHERE (((Date()-[Ron Data mid AP].[MS Date Opened])<149))AND (([Ron >> Data mid AP].FileToSupervisor) Is Null)); > > -- > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com ----------------------------------------- Get Breaking News from CNN, ABC, NBC, CBS Now. http://www.xuppa.com/news/?link=webmail