A strange question has come up today. I can't figure out what's going on. Just remember.
1, first there is a table A, containing the field number, date (varchar (250)), the value
The occurrence date field has a non-normal date string, with null, an empty string, which may be a wrong-touch keyboard caused by the input number.
Use a statement query to derive results.
SELECT FID, FGrossBalanceTime1, Fweightfrom aWHEREin ( 243423,99188)
2. Prepare to filter out abnormal time data
Added search criteria to filter out null, empty string and non-date format
SELECTFID, FGrossBalanceTime1, Fweight fromaWHERE 1 = 1 andFIDinch(243423,99188) andFGrossBalanceTime1 is not NULL andFGrossBalanceTime1<> "' and ISDATE(FGROSSBALANCETIME1)= 1
3, take the data within the specified time
SELECTFID, FGrossBalanceTime1, Fweight fromaWHERE 1 = 1 andFIDinch(243423,99188) andFGrossBalanceTime1 is not NULL andFGrossBalanceTime1<> "' and ISDATE(FGROSSBALANCETIME1)= 1 andFGrossBalanceTime1<= GETDATE()
Black question mark
Subtract 243423 of this data from FID in to perform normal ...
It seems that the IsDate function is the last execution cause of the problem?
Record: A strange problem with SQL Server.