Hi
I am trying to rename column names to lower case with
ALTER TABLE plant RENAME ID TO id
ALTER TABLE plant RENAME AREA_CODE TO area_code
The case remains capital letters.
Is it possible to rename the case?
|
You can try
ALTER TABLE plant RENAME ID TO id1
ALTER TABLE plant RENAME ID1 TO id
|
In my memory, DBF format will store column name in upper case.
|
Hi
The columb staysupper case. I use postgres and dbase with the same birt report.
Postgres uses small case and dbase uppercase. The dataset in birt does not work.
I can change the case manually to lower case with dbase, but this will take a long time.
Is it possible to rename fields to lower case?
I use hxtt properties.setProperty("versionNumber","DB2K");
properties.setProperty("DefaultExtension","DBF");
properties.setProperty("Default Index Suffix","MDX");
|
It will provide allowLowerCaseFieldName connection property, which the default value is true;
|
I have tested the new driver, but the case remains capital
The code is as follows;
Properties properties = new Properties();
properties.setProperty("versionNumber","DB2K");
properties.setProperty("DefaultExtension","DBF");
properties.setProperty("Default Index Suffix","MDX");
properties.setProperty("lockType", "DBASE4BDE");
properties.setProperty("loadIndices","true");
properties.setProperty("allowLowerCaseFieldName","true");
String jdbcConnection = "jdbc:dbf:////D/dms2000/data/dms";
conn = DriverManager.getConnection(jdbcConnection,properties);
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String temp1 = "CREATE TABLE test (field1 CHAR(10))";
st.executeUpdate(temp1);
String temp = "ALTER TABLE test RENAME field1 TO id1";
System.out.println(temp);
st.executeUpdate(temp);
st.close();
|
I haven't tested your sent sample, because the latest package is released just now. Please try it.
|
The CREATE TABLE works correct.
The ALTER TABLE still renameS the field to UPPER CASE.
|
Thank you.
The alter command always changes the filenaam to UPPERCASE. Is this correct?
|