Excel Forumla to SQL
What will get instead? 24,23,23?Then try:SELECT Calculation = cast(round((175*POWER((((CONVERT(float,@K2)-24.55)/0.854)*0.011312),-1.154))*POWER((CONVERT(float,@J2)),-0.203),0) as int)
View ArticleExcel Forumla to SQL
Cast/Convert the final output to INT, like:SELECT Calculation = cast((175*POWER((((CONVERT(float,@K2)-24.55)/0.854)*0.011312),-1.154))*POWER((CONVERT(float,@J2)),-0.203) as int)~Manu...
View ArticleExcel Forumla to SQL
Perfect thanks...How do i only get 0 decimal points, because currently im getting23.7698775456383 23.1193687043022 22.62244672045
View ArticleExcel Forumla to SQL
You need to apply CONVERT. Demo follows:DECLARE @K2 varchar(32) = '100', @J2 varchar(16) = '2'SELECT Calculation =...
View ArticleExcel Forumla to SQL
i tried RTRIM on K2 and J2 but no luck, how do i change the datatype to float
View ArticleExcel Forumla to SQL
Seems that the datatype is a char()? Maybe with trailing spaces?If so, change the datatype to float and trim the trailings spaces.
View ArticleExcel Forumla to SQL
As Balmukund suggested of problematic data, could you provide some values of under K2 & J2 cells.Looks like data size issue. ~Manu http://sqlwithmanoj.wordpress.com K2 128 129 134 128 113 108 105...
View ArticleExcel Forumla to SQL
As Balmukund suggested of problematic data, could you provide some values of under K2 & J2 cells.Looks like data size issue.~Manu http://sqlwithmanoj.wordpress.com
View ArticleExcel Forumla to SQL
thanks, but i get the following error msgMsg 8115, Level 16, State 8, Line 1Arithmetic overflow error converting varchar to data type numeric. Your data is having problem.Balmukund Lakhani | Please...
View ArticleExcel Forumla to SQL
thanks, but i get the following error msgMsg 8115, Level 16, State 8, Line 1Arithmetic overflow error converting varchar to data type numeric.
View ArticleExcel Forumla to SQL
You can convert it following the prototype below:DECLARE @K2 float = 100, @J2 float = 2SELECT Calculation = (175*POWER((((@K2-24.55)/0.854)*0.011312),-1.154))*POWER((@J2),-0.203)/* Calculation...
View ArticleExcel Forumla to SQL
I have the following MS Excel formula that i need to use in TSQL,How do i do this in an UPDATE STATEMENT or something...=(175*((((K2-24.55)/0.854)*0.011312)^-1.154))*((J2)^-0.203)thanks in advance
View Article
More Pages to Explore .....