Re: How to run a *.sql file from Pro*C ?

From: Parris Geiser <parris_at_walleye.esp.bellcore.com>
Date: 1996/01/17
Message-ID: <4djvjq$qo6_at_athos.cc.bellcore.com>#1/1


Jagdeep Shiruru (jagdeep_at_base.bellcore.com) wrote:
> Hi,
 

> I have a file abc.sql which I run from the SQL prompt as 'start abc.sql'
> I need to run this file from a Pro*C function. How do I do that ?
> Any help is appreciated. Thanks
 

> Jagdeep
> jagdeep_at_base.bellcore.com

use the system command as follows:
Define a string as follows:

	sprintf(cmd,"%s \n %s \n %s \n", "sqlplus <<!", "start abc.sql","!");
	system(cmd);
Of course, if you want to see the results you must use popen.
	parris
Received on Wed Jan 17 1996 - 00:00:00 CET

Original text of this message