This is my Query
SELECT TOP 1 MAX(CAST(Id AS int)) , Ddate, Name FROM WonPrize WHERE Ddate=@Ddate GROUP BY Id,Ddate,Name
The Query is giving me an error code on VB.NET.
IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
I don't think I have an error with the syntax that I am composing
I am trying to display the MAX ID but MAX(Id) is not displaying the Number 2 Id so I tried to use this MAX(CAST(Id AS int)). and it gives me an error code. What should be my mistakes?
I am using the oledb.