mssql query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've used mysql a little, but now I'm working with a MS SQL SERVER 2000 
database.  We have a proprietary application/hardware setup where 
when a person enters the building, the time they enter the building 
is automatically put into the database in a field called eventtime, and 
their access card is entered in a field called cardnum.  The 
time entered is like the mysql NOW() function (i dunno what its called in 
mssql), the format is YYYY-MM-DD HH:MM:SS.000 anyway.  I need to write an 
SQL query that will get a unique count of cardnum based on how many times 
the person enters a building each day.  So I need to do some sort of 
UNIQUE (although in mssql I think its distinct) count on the YYYY-MM-DD 
and ignore the HH:MM:SS.000, but looking at the mssql reference book I 
have, it doesn't go into great detail on date functions, so I was 
wondering if anyone knows how to do a unique on the eventtime with 
the date and ignore the time.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux