Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Easy One
Message
 
À
06/01/2004 10:43:21
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Divers
Thread ID:
00864178
Message ID:
00864208
Vues:
18
Below is a SQL statement I am running. The query returns 0 records, but it should return 1 record. The problem is with the end_time portion of the where clause, though I don't know how to fix it.

Please help


SELECT dc_id, taskdtl_id, userid, start_time, end_time, total_time,
billable, opcode_id
FROM data_collection
WHERE taskdtl_id = 240
and userid = 1
and end_time = 01/05/04


In SQL Server there is no such thing as a "Date" Type Field - only "DateTime" so what's happening here is that 01/05/04 is being transalated 01/05/04 12:00:00 AM

If you're looking for a record for a particular date you may want to use ...end_time > '01/05/04' or ...end_time between '01/05/04' and '01/06/04'
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform