Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select count not the same from Web and SSMS
Message
 
 
À
18/03/2015 09:03:31
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01616928
Message ID:
01616930
Vues:
36
>I have a select like this:
>
>
>DECLARE @NoClient Int
>DECLARE @Tax Float
>DECLARE @NoStatus Int
>DECLARE @NoStatus2 Int
>DECLARE @AddDate DateTime
>
>SET @NoClient=2087603
>SET @Tax=1
>SET @NoStatus=7
>SET @NoStatus2=8
>SET @AddDate='2014-10-01 15:29:59'
>
>SELECT Invoice.Numero
> FROM Invoice (NOLOCK)
> WHERE Invoice.NoClient=@NoClient AND Invoice.Tax=@Tax AND
>  Invoice.NoStatus<>@NoStatus AND Invoice.NoStatus<>@NoStatus2 AND
>  Invoice.AddDate>@AddDate
>
>
>From IIS and ASP.NET, this returns 0 record. From SSMS, it returns 1 record.
>
>Can someone tell me what could be a setting factor here that could make IIS and ASP.NET not able to find the record?

Well, if you remove NOLOCK hint you should get 1 row from all applications.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform