Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm attempting to replicate the functionality of an Excel workbook in Oracle. One of the formulae on the worksheet uses CHIDIST, which "Returns the one-tailed probability of the chi-squared distribution". I can't see a similar function in Oracle anywhere! Am I going to have to write my own CHIDIST function?

Here's a link to Excel's documentation on CHIDIST: http://office.microsoft.com/en-gb/excel-help/chidist-HP005209010.aspx

I've already worked out the Chi Square and Degrees of Freedom.

Thanks

share|improve this question
    
Could you elaborate on why you need that in a query? Oracle does have some statistical functions, but they're more geared towards actually analyzing datasets. –  Mat Jun 11 '13 at 18:00
    
I need this because I have to replicate one of our clients' Excel sheets which has this calculation in it. The results returned by my Oracle query need to match exactly those in Excel. –  user1578653 Jun 12 '13 at 8:06
    
Some of the functionality in your spreadsheet might not best be replaced by server-side code. From what I can tell from the docs you link to, that function is "static"/"pure" not data-driven, it doesn't appear to be the type of thing you'd expect from the database side. –  Mat Jun 12 '13 at 8:36
    
The data that was originally stored in the Excel sheet is now stored in Oracle. The client wants reports automatically generated from the Oracle data. Our reporting system works by carrying out a query and effectively pasting it into an MS Word document. I think the only way I can get the CHIDIST information is through doing it in the database. I may just have to write a custom PL/SQL function to achieve this... –  user1578653 Jun 12 '13 at 9:15
    
Yes you will need to write your own. PL/SQL compiles to native code in Oracle 11g, so speed will not be an issue. –  Gaius Jun 13 '13 at 14:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.