Home » Developer & Programmer » Precompilers, OCI & OCCI » Calling TurboC program in Oracle
Calling TurboC program in Oracle [message #160388] Fri, 24 February 2006 22:43 Go to next message
orajamzs
Messages: 110
Registered: February 2006
Location: hyderabad
Senior Member
Can any guru suggest me how to execute a c program in oracle..i have this c program
#include<stdio.h>
main(){
float c=37.0,fh=0;
fh = (9.0/5.0)*c+32.0;
printf("%f" , fh);
}
--- how this program can be called by oracle...explanation step wise needed plz help
Re: Calling TurboC program in Oracle [message #161192 is a reply to message #160388] Thu, 02 March 2006 08:42 Go to previous messageGo to next message
kshkid
Messages: 24
Registered: November 2005
Junior Member
why do you need oracle to do this plain task?

No DB related activity is involved.

your basic C libs would do that.
Re: Calling TurboC program in Oracle [message #167263 is a reply to message #160388] Wed, 12 April 2006 03:41 Go to previous message
Michael Hartley
Messages: 110
Registered: December 2004
Location: West Yorkshire, United Ki...
Senior Member

Hi

although you have asked your question using a C code example, you question is how do I perform the following maths calculation in SQL.

First I checked what the value should be in MS Calc for no reason other I wanted to verify the answer independantly.

9.0/5.0 * 37.0 + 32.0=

Then I connect to oracle using SQLPLUS
./sqlplus /nolog
connect username/password

19:36:46 > select 9.0/5.0 * 37.0 + 32.0 from dual;

9.0/5.0*37.0+32.0
-----------------
98.6

19:36:47 >

Kind regards
Michael Hartley
http://www.openfieldsolutions.co.uk

Previous Topic: pro*cobol
Next Topic: What is the usage of Pro*C?
Goto Forum:
  


Current Time: Wed Sep 17 05:33:17 CDT 2014

Total time taken to generate the page: 0.07400 seconds