Re: [GENERAL] Using sequences in SQL text files

2008-02-20 Thread intelforum
HHB wrote: Thank you all for your help. Let me summer what I'm trying to do: I have an empty database that I want to populate it with data. I created SQL text files, categories.sql, books.sql As I'm a Java guy, I use Apache Ant SQL taks to run those SQL text files. So, I run categories.sql f

Re: [GENERAL] Using sequences in SQL text files

2008-02-20 Thread Thomas
On 20 févr. 08, at 08:57, HHB wrote: Thank you all for your help. Let me summer what I'm trying to do: I have an empty database that I want to populate it with data. I created SQL text files, categories.sql, books.sql As I'm a Java guy, I use Apache Ant SQL taks to run those SQL text f

Re: [GENERAL] Using sequences in SQL text files

2008-02-20 Thread HHB
Thank you all for your help. Let me summer what I'm trying to do: I have an empty database that I want to populate it with data. I created SQL text files, categories.sql, books.sql As I'm a Java guy, I use Apache Ant SQL taks to run those SQL text files. So, I run categories.sql file first, t

Re: [GENERAL] Using sequences in SQL text files

2008-02-19 Thread brian
HHB wrote: Hi. I have sequence for each table in my database. In order to populate same data in the database, I created some SQL text files. --- insert into categories values (id value from sequence, '..', '...'); insert into books values (id value from sequence, '..', '...', '..', fk to category

Re: [GENERAL] Using sequences in SQL text files

2008-02-19 Thread Lone Wolf
Can I have something like this in my SQL text file: (items_seq.nextval(), '', '...') ? Raymond O'Donnell <[EMAIL PROTECTED]> wrote: On 19/02/2008 15:43, HHB wrote: > How to use a sequence in such text files? You're looking for the nextval() function - look it up in the docs. Ray. -

Re: [GENERAL] Using sequences in SQL text files

2008-02-19 Thread Richard Huxton
HHB wrote: Hi. I have sequence for each table in my database. In order to populate same data in the database, I created some SQL text files. --- insert into categories values (id value from sequence, '..', '...'); insert into books values (id value from sequence, '..', '...', '..', fk to category

Re: [GENERAL] Using sequences in SQL text files

2008-02-19 Thread Raymond O'Donnell
On 19/02/2008 15:43, HHB wrote: How to use a sequence in such text files? You're looking for the nextval() function - look it up in the docs. Ray. --- Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland [EMAIL PROTECTED]

[GENERAL] Using sequences in SQL text files

2008-02-19 Thread HHB
Hi. I have sequence for each table in my database. In order to populate same data in the database, I created some SQL text files. --- insert into categories values (id value from sequence, '..', '...'); insert into books values (id value from sequence, '..', '...', '..', fk to category id); --- Is