ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sugandha Shah" <sugand...@cybage.com>
Subject Re: SQL
Date Wed, 17 Oct 2001 05:02:11 GMT
Hi Johan ,

Thanx a lots !!!!!!!!!!!!
With the Ant 1.5 jar it has worked .
I really appreciate the help.

Thanx
-Sugandha
----- Original Message -----
From: "Johan Adelöw" <Johan.Adeloew@corustechnologies.com>
To: <ant-user@jakarta.apache.org>
Sent: Tuesday, October 16, 2001 7:46 PM
Subject: RE: SQL


This works fine for me, I think you forgot the / at the end of the
procedure.
It´s needed to be able to know when the procedure has ended.

/Johan

This works fine for me:

<project name="MyProject" default="sql" basedir=".">

<target name="sql" description="creates tables">
<sql
    driver="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@jadpc:1521:jad"
    userid="rep1"
    password="rep1">

CREATE OR REPLACE PROCEDURE INS_TRACKER_DATA(USER_ID IN VARCHAR2, STARTDATE
IN DATE, ENDDATE IN DATE, ORIG_DOC_SIZE IN VARCHAR2, FORMATTED_DOC_SIZE IN
VARCHAR2, SRC_URL IN VARCHAR2 , URL_DOMAIN  IN VARCHAR2) IS

BEGIN

  insert into TRACKER

(tracker_id,imode_user_id,tracker_startdate,tracker_enddate,orig_doc_size,fo
r
matted_doc_size,src_url,url_domain)

values(tracker_ids.nextval,USER_ID,STARTDATE,ENDDATE,ORIG_DOC_SIZE,FORMATTED
_
DOC_SIZE,SRC_URL,URL_DOMAIN);

END INS_TRACKER_DATA;
/
</sql>

</target>
</project>




-----Original Message-----
From: sugandha shah [mailto:drsugandha@yahoo.com]
Sent: den 16 oktober 2001 08:18
To: ant-user@jakarta.apache.org
Subject: SQL


Hi Johan,
 If you could send modified Sql task, it will  be
really helpful.

Basically storedproc.sql contains this script :

CREATE OR REPLACE PROCEDURE
SEL_CATEGORY_DATA(vchcategory_id IN
VARCHAR2,vchcat_name OUT VARCHAR2,vchcat_Lang OUT
VARCHAR2,vchcat_desc OUT
VARCHAR2)  IS
BEGIN
   SELECT imode_category_name
,imode_category_language,imode_category_desc
into vchcat_name,vchcat_Lang, vchcat_desc FROM
Imode_CATEGORY WHERE
IMODE_CATEGORY_ID = vchcategory_id;
END SEL_CATEGORY_DATA;

Now my build.xml contains :
<project name="MyProject" default="sql" basedir=".">
 <target name="sql1" depends="sql" description=
"creates tables">
    <sql
    driver= "oracle.jdbc.driver.OracleDriver"
    url = "jdbc:oracle:thin:@Sugandha:1521:Intelli"
    userid = "imode_user"
    password = "imode"
    onerror = "continue" >
  <transaction  src="StoredProc.sql" />
 </sql>
</target>
</project>

This doesn't work . Any help will be appreciated.


Thanx
-Sugandha

-----Original Message-----
From: Sugandha Shah [mailto:sugandhas@cybage.com]
Sent: den 15 oktober 2001 15:37
To: ant-user@jakarta.apache.org
Subject: SQL


Hi
I want to execute sql script which has stored
procedure in it .
I 'm able to create user ,create table etc.
But not able to run sql with stored procedure.

Has any one any suggestions?Any help will be
apppreciated.

Thanx
-Sugandha





__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Mime
View raw message