You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pritesh saharey <pr...@sqatester.com> on 2004/03/20 07:29:41 UTC
Running an Insert query
Hi All,
I would like to insert atleast 50,000 records in database, there is a Ticket_ID field which is unique and autogenerated like this 104031000001, 104031000002 ....,
what should i do in my build.xml file to run an Insert query (database is Mysql), the query can be like this
INSERT INTO moviecan VALUES(104031000001,'Naseeb','Hope','2004-03-18 11:19:55',100,2500,25,0,1,1,'U',2,2,'2004-03-18 11:23:13');
I would like to get different Ticket_ID in incremental form like this 104031000001, 104031000002, 104031000003 ...., for every Insert query
can anybody help me out
thanks in advance
wishes
pritesh
_____________________________________________________________
Join SQAtester.com Community ---> http://www.sqatester.com/testersarea/joinus.htm
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Running an Insert query
Posted by Marco Rouse <we...@servimx.net.mx>.
First run myisamchk and set the auto-increment value you want to
start with -A or --set-auto-increment[=value] then set the value
of the auto increment column in the insert to null.
-----Mensaje original-----
De: Matt Benson [mailto:gudnabrsam@yahoo.com]
Enviado el: Sábado, 20 de Marzo de 2004 12:37 p.m.
Para: Ant Users List; pritesh@sqatester.com
Asunto: Re: Running an Insert query
I don't know about MySQL, but in Oracle you would use
something called a "sequence" and reference it in your
query to set the next value. I would imagine that the
MySQL developers would have implemented something
similar.
-Matt
--- Pritesh saharey <pr...@sqatester.com> wrote:
> Hi All,
> I would like to insert atleast 50,000 records
> in database, there is a Ticket_ID field which is
> unique and autogenerated like this 104031000001,
> 104031000002 ....,
> what should i do in my build.xml file to run an
> Insert query (database is Mysql), the query can be
> like this
> INSERT INTO moviecan
> VALUES(104031000001,'Naseeb','Hope','2004-03-18
> 11:19:55',100,2500,25,0,1,1,'U',2,2,'2004-03-18
> 11:23:13');
>
> I would like to get different Ticket_ID in
> incremental form like this 104031000001,
> 104031000002, 104031000003 ...., for every Insert
> query
>
> can anybody help me out
>
> thanks in advance
> wishes
> pritesh
>
>
>
>
>
>
>
_____________________________________________________________
> Join SQAtester.com Community --->
> http://www.sqatester.com/testersarea/joinus.htm
>
>
-----------------------------------------------------------------
----
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
-----------------------------------------------------------------
----
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Running an Insert query
Posted by Matt Benson <gu...@yahoo.com>.
I don't know about MySQL, but in Oracle you would use
something called a "sequence" and reference it in your
query to set the next value. I would imagine that the
MySQL developers would have implemented something
similar.
-Matt
--- Pritesh saharey <pr...@sqatester.com> wrote:
> Hi All,
> I would like to insert atleast 50,000 records
> in database, there is a Ticket_ID field which is
> unique and autogenerated like this 104031000001,
> 104031000002 ....,
> what should i do in my build.xml file to run an
> Insert query (database is Mysql), the query can be
> like this
> INSERT INTO moviecan
> VALUES(104031000001,'Naseeb','Hope','2004-03-18
> 11:19:55',100,2500,25,0,1,1,'U',2,2,'2004-03-18
> 11:23:13');
>
> I would like to get different Ticket_ID in
> incremental form like this 104031000001,
> 104031000002, 104031000003 ...., for every Insert
> query
>
> can anybody help me out
>
> thanks in advance
> wishes
> pritesh
>
>
>
>
>
>
>
_____________________________________________________________
> Join SQAtester.com Community --->
> http://www.sqatester.com/testersarea/joinus.htm
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org