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

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

Power function in SQL 2005

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :

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. 

View Complete Post

More Related Resource Links

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?

SSRS 2005 SP3 - Instr function with Global Variable fails in Subscriptions

Hi I have a very simple expression in a text box in my report:  INSTR(Globals!ReportServerUrl,"Report").  This expression should return the integer value of where the string "Report" appears in the Global variable for the ReportServerUrl.  Simple enough.  This works fine for generating the report directly through report manager, and in my case returns a value of 20. However when run as a subscription and emailed to myself the value returned is 0. This suggests that the search string does not appear in the Global variable. In the reportserver config file the URLroot tag contains the correct server address - http://myserver/reportserver. Does anyone know why i should be experiencing this issue with my subscriptions?  Your help would be much appreciated! Thanks Guy  Guy

Implementing Cumulative Beta Distribution function in Sql server 2005.

Hi,   I am trying to implement BETADIST function which is present in Excel through Sql Server Integration Services(SSIS). Can any body help me on this.   Thanks in advance, Prasad Palaparthy.

Power Function in SQL

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.

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?



Problem with ISNumeric function in SQL Server 2005


Even though the system function IsNumeric('2,344') returns a true in SQL Server 2005, why does the following throw an error? Is there a special way to cast to numeric types in SQL Server 2005, so the statement below does not throw an error?

          WHEN 1 THEN CAST('2,344' AS INT)
          ELSE NULL

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



i've installed SQL server 2005 express and Visual web developper 2005 express.

when i whant to create a database in VWD the following error occures:

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=49251

i searched the internet but can't find the solution, i already reinstalled my complete workstation but the problem stays.

please help!

Can I Feed a table variable or table-like types to my function(My SQL version 2005 Standard SP3)?


Hello All:


My question is whether I can feed a table variable to my table-valued function in SQL 2005 SP3 standard edition?

If no, can I feed a XML type to the function? I guess, probably I can feed a XML. Yet, for this case I am afraid , in the function, the XML-parsing may be costly if I stuff over 10K uniqueIdentifier data into this XML variable.

Any good idea from you ?



--Derek D. 


Creating a CLR function for SQL Server 2005



I'm new about CLR integration. I have on my machine SQL Server 2005 Dev. Edition and VSTO 2005. Inside VSTO I have tried to create a prj: I have selected the C# language, but I cannot see a voice for the SQL Server project template. The option CLR Integration for SQL Server is enabled.

Any helps for me, please? Thanks

Does SQL Server 2005 support invoking secure (https) webservice as part of CLR proceduer/function ?


Does SQL Server 2005 support invoking secure (https) webservice as part of CLR proceduer/function ?

If yes, what exactly we need to do to make it working?

As I have a web service which is working fine for me if I'm calling it normally like "http://......" but same is generating error as below if I am calling it like "https:/..."

Error : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.   at System.Net.HttpWebRequest.GetResponse()


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,

How to Encrypt and Decrypt a Password using SQLSERVER 2005?(Video)

Encypt and Decrypt a Password using SQLSERVER 2005(Video)

SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

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

sql server 2000 vs 2005


i would like to ask what the difference between sql server 2000 and 2005 

How to save Unicode in SQL Server 2005

I am using google transliteration to display the text in Hindi/Tamil

I tried to store the text appear as Hindi from textarea in an nvarchar
field of database (SQL Server 2005) , the text saved as "???????".

After retireving text from the same it display the text as "???????".

Can anyone help me how to store and retrieve the actual data from SQL
Server 2005?

I am using ASP.net,VB.Net and SQL Server 2005

build repository from SQL 2005? for a Linq, Jquery autocomplete



  I have the a question am going about his correctly I have a database for categories, it has many fields and about 4000 records,  but with a Jquery autocomplete needing speed and the fact that I only need to return a key and category name. I did the following:  (oh just to note, MVC2, Ajax project)


    public class categorySearch
        public Guid Category_GUID { get; set; }
        public string Category_Name { get; set; }


and now for the repository

    public class categoryRepository
        internal List<categorySearch> FindCategory(string searchText, int maxResults)
            List<categorySearch> category = new List<categorySearch>();
            dbWebEntities storedb = new dbWebEntities(); 

            var getcat = storedb.Categories.ToList();

            foreach (var item in getcat)
                category.Add(new categorySearch { Category_GUID = item.Cat_GUID, Category_Name = item.Category_Name});

            var result = from c in category
                         where c.Category_Name.Contains(searchText)
                         orderby c.Category_Name
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