Hi Sam,
I am facing a issue with with new version of h2 1.4.197
create alias name already exists
below is my code
builder.setName(DB_NAME);
InputStream inputStream =
this.getClass().getResourceAsStream(SQL_REFERRALS_DB_TABLES_FILE);
String toDataAlias = "CREATE ALIAS to_date FOR
\"aero.sita.gsl.irisk.core.utils.RiskDataEmbeddedDatabaseFunction.toDate\";\n";
String tablesAsText = new Scanner(inputStream,
SQL_CHARSET_NAME).useDelimiter(SQL_EOF_DELIMITER).next();
tablesAsText = StringUtils.replace(tablesAsText, "NOMINVALUE",
"--NOMINVALUE");
tablesAsText = StringUtils.replace(tablesAsText, "REFERENCES",
"--REFERENCES");
tablesAsText = StringUtils.replace(tablesAsText, "ENABLE", "");
tablesAsText = StringUtils.replace(tablesAsText, "NOVALIDATE", "");
tablesAsText = StringUtils.replace(tablesAsText, "NOMAXVALUE",
"--NOMAXVALUE");
tablesAsText = StringUtils.replace(tablesAsText, "NOORDER",
"--NOORDER");
tablesAsText = StringUtils.replace(tablesAsText, "DEFAULT USER NOT
NULL", "DEFAULT USER() NOT NULL");
tablesAsText = StringUtils.replace(tablesAsText, "31-DEC-3999",
"3999-12-31");
tablesAsText = StringUtils.replace(tablesAsText, "01-DEC-3999",
"3999-12-01");
tablesAsText = StringUtils.replace(tablesAsText, " CHAR)", ")");
tablesAsText = tablesAsText + toDataAlias;
builder.addScript(tablesAsText);
dataBase = builder.build();
}
can you tell me how to resolve the issue or what script i have to change
On Wednesday, February 10, 2016 at 5:51:48 PM UTC+5:30, Sam Blume wrote:
>
> Hi
>
> I've contributed the TO_DATE (and TO_TIMESTAMP) code to H2 and it should
> be in Version 1.4.191
> <http://mvnrepository.com/artifact/com.h2database/h2/1.4.191> .
> But it's not mentioned in the change log. AND it can be removed from
> the road map as well.
> Please also add following note (or something similar) to the change log:
>
>> Note: If you have programed an alias with that name, you need to delete
>> that alias first or H2 will complain of having a name clash.
>
>
> Cheers Sam
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.