Harish Batchu

Harish Batchu

  • NA
  • 255
  • 70.2k

When executing command i am getting only two records?

Nov 14 2018 5:38 AM
 
When execting command manully i am getting top records
 
command
--------------
select top(3) de.ExpenceType as exltype,ed.UserExpenceDetail_Amount as exlAmount from ft_UserExpenceDetail ed inner join Dim_ExpenceType de on de.UserExpencedetailType_id=ed.UserExpenceDetail_Id where MONTH(ed.UserExpenceDetail_Date) = MONTH(GETDATE()) and ed.User_Uniq='150883940' order by exlAmount DESC
 
 
but when excuting from ado.net i am getting only three record
 
commad
------------ 
string Query = "select top(4) de.ExpenceType as exltype,ed.UserExpenceDetail_Amount as exlAmount from ft_UserExpenceDetail ed inner join Dim_ExpenceType de on de.UserExpencedetailType_id=ed.UserExpenceDetail_Id where MONTH(ed.UserExpenceDetail_Date) = MONTH(GETDATE()) and ed.User_Uniq='" + uniq + "' ORDER BY ed.UserExpenceDetail_Amount DESC"; 
 
 Please help out
 
advance thanking you 
 
 

Answers (2)