drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiv Kumar <sanjiv...@gmail.com>
Subject cast not working in adding two columns
Date Thu, 15 Dec 2016 18:05:46 GMT
       I am using drill 1.9 version in embedded mode and in Window 10.
My question is when i  am adding two integer column, its working fine.
     e.g:- select P.`costprice` + P.`initialprice` from
testplugin.dbo.testtable P;
     NOTE:- both columns costprice and initialprice are integer.

But when i am adding integer column with varchar column, then it working.
   e.g:-  select P.`costprice` + P.`Name` from testplugin.dbo.testtable P;
           select P.`costprice` + cast(P.`Name` as int) from
testplugin.dbo.testtable P;
Both are not working.Please suggest some way how to add two different
datatype columns.

Thanks & Regards.
Sanjiv Kumar.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message