• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

CVS oracle_db_struct.sql 1.7 -> Error in script

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

I found another problem in the creation scripts of the banner table, this time in the oracle port.
The problem is that "COMMENT" is a reserved keyword in Oracle and it is being used as one of the columns in that table.
Hence, the sentence:

... fails with an error:


Right now I changed it to banner_coment so at least I can install it. However, that will probably will break some code when retrieving the column, so a more profund change might be required.

As a rule of a thumb, I would recommend using some kind of naming standard for columns as well, for easier recognition of columns/tables where they come from and avoiding conflicts. As an example, in our case, we usually add "XXX_" in front of the name, being XXX the "short unique preffix" of the table.

I hope it helps,
Cheers,
D.


[originally posted on jforum.net by GreenEyed]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that I saw how, I added a bug report to JIRA
[originally posted on jforum.net by GreenEyed]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot.

I'm merge it as soon as I get some available time.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.

Try this:
CREATE TABLE jforum_banner (
banner_id NUMBER(10) NOT NULL,
name VARCHAR(90),
placement NUMBER(1) DEFAULT 0 NOT NULL,
description VARCHAR(30),
clicks NUMBER(8) DEFAULT 0 NOT NULL,
views NUMBER(8) DEFAULT 0 NOT NULL,
url VARCHAR(90),
weight NUMBER(2) DEFAULT 50 NOT NULL,
active NUMBER(1) DEFAULT 0 NOT NULL,
"COMMENT" VARCHAR(50), --- Offending line
type NUMBER(5) DEFAULT 0 NOT NULL,
width NUMBER(5) DEFAULT 0 NOT NULL,
height NUMBER(5) DEFAULT 0 NOT NULL,
PRIMARY KEY(banner_id)
);
[originally posted on jforum.net by Anonymous]
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!