.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Power Function in SQL

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :Sql Server
Hi, i have function to calculate XIRR in sql server 2005. In this function power function is to be used. but it will gives me an error when i do power of such this values which are POWER (-0.01259,0.14873) Thanks in AdvanceMaulik A. Dusara Tech Lead.

View Complete Post

More Related Resource Links

So how do you use or code the POWER function when the value is negative?


I am writing complex code when I got the error message
 Msg 3623, Level 16, State 1, Line 1
 A domain error occurred.

I realized that the value that I was passing was negative.
For example:  select (POWER(-0.37,.5))

So how do you use or code the POWER function when the value is negative?



Power function in SQL 2005


I am having problems using the power function in SQL 2005. The syntax I am using is FScore = Power(0.89, [OScore]). FScore doesn't compute when the score is > 45. Both FScore and OScore are set to float in the underlying table. I have tried changing the fields to numeric, decimal, int etc but still no good. 


Thanks for any help anyone can provide me with on this. 

Power of using Clause in SharePoint

The Using Clause will help to avoid memory leaks in SharePoint by automatically Disposing the MOSS objects.

For example when we create SPSite and SPWeb objects, if we don't dispose it explicitly it might create memory leaks,

Content page control passes as argument to javascript function


Here is the content page:


<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="JavaDynamicCopyValue.aspx.cs" Inherits="JavaDynamicCopyValue" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script type="text/javascript" >
 function copyValue(input, output )
   ouput.value = input.value;
   return true;
 <asp:TextBox ID="txt1" runat="server" onchange="copyValue(this,document.getElementById('<%=txt2.ClientID%>'))"></asp:TextBox>
    <br />
    <br />
    <asp:TextBox ID="txt2" runat="server"></asp:TextBox>


I got a javascript run time error says output is undefined. if I view source of the page, the txt1 markup became:

<input name="ctl00$ContentPlaceHol

connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly.


I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.

 I have two SQL Server instances installed.

 1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)

But when i try to add a database to my VS website project I get the following error:

Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925

I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)

and changed the "SQLEXPRESS" to "USERLT\SQL2005".

But I still get the same error message. Any ideas how i can resolve this issue?

Public Shared function doubt????

I am using VB.net/ASP.NET and SQL Server 2000 for a web application.

For populating the dropdowns, I wrote a Public Shared function LoadDDL(), in which I pass the dataset and dropdown name to set.

I have my doubts that this function will produce unexpected results for concurrent users. And will mix the results among sessions because it is a Shared function.

I am confused here. Is it the right way to go?

Please advice. Thanks in advance.




i have got a project to be done on the solaris to be done on JSP but i m so much impressed with the power of .net that i want to do in asp.net so is it posssible to work with ASP.NET on solaris

Trim function in C Sharp

How do i use "trim" function in C Sharp? I have a string and i want to strip off spaces from the end of the string. Any idea how do i do it??


Cloud Computing: Patterns For High Availability, Scalability, And Computing Power With Windows Azure


Here we examine the typical cloud platform architecture and some common architectural patterns, along with their implementation on the Windows Azure offering from Microsoft.

Joshy Joseph

MSDN Magazine May 2009

Usability in Practice: The Power of Personas


A persona is a description of a fictional person representing an amalgamation of traits found in a segment of your users. Emplolying personas arms you with a powerful foundation on which to base design decisions.

Dr. Charles B. Kreitzberg and Ambrose Little

MSDN Magazine April 2009

Team System: Essential Power Tools.


Brian Randell introduces you to some crucial Power Tools for getting the most out of Team System.

Brian Randell

MSDN Magazine August 2008

Mobility: Make Your WPF Apps Power-Aware


Here Andre Michaud shows you how to use power notifications to make your applications power aware.

Andre Michaud

MSDN Magazine July 2007

VISUAL BASIC: Unleash The Power Of Query In Visual Studio "Orcas"


LINQ, coming in the next version Visual Studio, codename "Orcas", adds type-safe data querying to .NET languages.

Ting Liang and Kit George

MSDN Magazine June 2007

Peer To Peer: Harness The Power Of P2P Communication In Windows Vista And WCF


P2P applications face a number of barriers preventing their wide adoption as a productivity solution. Fortunately Windows Vista improves the situation, as you'll learn here.

Justin Smith

MSDN Magazine October 2006

Add-In Power: Let Users Customize Your Apps With Visual Studio Tools For Applications


If you're looking to increase the usefulness of your applications by making them customizable, you'll want to read about these three technologies available from Microsoft.

Paul Stubbs

MSDN Magazine August 2006

Managed Spy: Deliver The Power Of Spy++ To Windows Forms With Our New Tool


Spy++ displays Win32 information such as window classes, styles, and messages. Now you can get that same functionality for managed code using our ManagedSpy. Get it here.

Benjamin Wulfe

MSDN Magazine April 2006

Mutant Power: Create A Simple Mutation Testing System With The .NET Framework


With mutation testing, the system under test is changed to create a faulty version called a mutant. Here James McCaffrey explains how to do this in .NET.

James McCaffrey

MSDN Magazine April 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend