Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Cannot call methods on float

$
0
0

Getting "Cannot call methods on float" when i run this query. I did a search and their are some blank rows in this column but I think that's the issue. I have also tried the following 2 changes and I still get that error. Do i need to put zero's in those blank fields? The Sale_price1 field is a char also.

SQL
SUM(ISNULL(((CASEWHENISNUMERIC(oe11.SALE_PRICE1)=0THENNULLELSECAST(oe11.SALE_PRICE1ASMONEY)END)),0))
SQL
SUM(CAST(OE11.SALE_PRICE1ASMONEY))ASGROSS

Here is the complete code

SQL
SELECTDISTINCTOE10.ORD_NUMB--,COUNT(DISTINCT OE10.0RD_NUMB) ,OE10.ORD_SHIPPED_FLAG,OE10.DATE_SHIPPED,OE10.PROD_CODE,OE10.IND_CODE,ISNULL(OE11.SALE_PRICE1,0),OE11.FG_ITEM_DESC--,AR10.TRANS_DLRFROMOE10LEFTOUTERJOINREPORTING.DBO.dimDateASDIMDATEONCONVERT(CHAR(10),DATEADD(d,OE10.RDAT_SHIPPED+5843,0),112)=dimdate.DateIdLEFTOUTER...

Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>