[MonetDB-users] ALTER TABLE doesn't work in MonetDB !!
Hi All, I am trying to add columns at the run time to one of the Tables and i am getting an error No Such Table. But when i try to select values from the table i get the values ( there are no rows in this table and no key columns as well..) Here is the Error: [CODE] Error Executing: ALTER TABLE collection_1234.collection_info add customer_a_name varchar(256):java.sql.SQLException: ALTER TABLE: no such table 'collection_info' java.sql.SQLException: ALTER TABLE: no such table 'collection_info' at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2048) at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:1798) at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:371) at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:340) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.quantum.util.proxy.ProxyFactory$InvocationHandlerImpl.invoke(ProxyFactory.java:37) at $Proxy4.execute(Unknown Source) at com.quantum.sql.MultiSQLServer.execute(MultiSQLServer.java:133) at com.quantum.sql.MultiSQLServer.execute(MultiSQLServer.java:91) at com.quantum.actions.BaseExecuteAction.getSQLResults(BaseExecuteAction.java:202) at com.quantum.actions.BaseExecuteAction.execute(BaseExecuteAction.java:174) at com.quantum.actions.ExecuteAction.execute(ExecuteAction.java:98) at com.quantum.actions.BaseExecuteAction.execute(BaseExecuteAction.java:125) at com.quantum.actions.BaseExecuteAction.run(BaseExecuteAction.java:111) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:443) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) SQL (DPACUSTOMER1) [select * from collection_1234.collection_info] Success: result set displayed [/CODE] Is this a bug or am i missing some thing ?? Thanks Sateesh -- View this message in context: http://www.nabble.com/ALTER-TABLE-doesn%27t-work-in-MonetDB-%21%21-tp1516802... Sent from the monetdb-users mailing list archive at Nabble.com.
Never mind.. i missed the literal 'column' before the column name in the syntax.. So it should be ALTER TABLE collection_1234.collection_info add COLUMN customer_a_name varchar(256); instead of ALTER TABLE collection_1234.collection_info add customer_a_name varchar(256); Thanks Sateesh sateesh wrote:
Hi All,
I am trying to add columns at the run time to one of the Tables and i am getting an error No Such Table.
But when i try to select values from the table i get the values ( there are no rows in this table and no key columns as well..)
Here is the Error:
[CODE] Error Executing: ALTER TABLE collection_1234.collection_info add customer_a_name varchar(256):java.sql.SQLException: ALTER TABLE: no such table 'collection_info' java.sql.SQLException: ALTER TABLE: no such table 'collection_info' at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2048) at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:1798) at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:371) at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:340) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.quantum.util.proxy.ProxyFactory$InvocationHandlerImpl.invoke(ProxyFactory.java:37) at $Proxy4.execute(Unknown Source) at com.quantum.sql.MultiSQLServer.execute(MultiSQLServer.java:133) at com.quantum.sql.MultiSQLServer.execute(MultiSQLServer.java:91) at com.quantum.actions.BaseExecuteAction.getSQLResults(BaseExecuteAction.java:202) at com.quantum.actions.BaseExecuteAction.execute(BaseExecuteAction.java:174) at com.quantum.actions.ExecuteAction.execute(ExecuteAction.java:98) at com.quantum.actions.BaseExecuteAction.execute(BaseExecuteAction.java:125) at com.quantum.actions.BaseExecuteAction.run(BaseExecuteAction.java:111) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:443) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
SQL (DPACUSTOMER1) [select * from collection_1234.collection_info] Success: result set displayed [/CODE]
Is this a bug or am i missing some thing ??
Thanks Sateesh
-- View this message in context: http://www.nabble.com/ALTER-TABLE-doesn%27t-work-in-MonetDB-%21%21-tp1516802... Sent from the monetdb-users mailing list archive at Nabble.com.
The Syntax only works in the default schema. If i try to alter a table in a user created schema then it's throwing the same Error "Table Doesn't exists" !!! Here is my Test Case.. [CODE] create table tmp.collection_info( test_col varchar(100)); ALTER TABLE "tmp"."COLLECTION_INFO" ADD COLUMN test_col1 varchar(256); ALTER TABLE tmp.COLLECTION_INFO ADD COLUMN test_col2 varchar(256); ALTER TABLE "tmp"."collection_info" ADD COLUMN test_col3 varchar(256); ALTER TABLE tmp.collection_info ADD COLUMN test_col4 varchar(256); [/CODE] Regards Sateesh -- View this message in context: http://www.nabble.com/ALTER-TABLE-doesn%27t-work-in-MonetDB-%21%21-tp1516802... Sent from the monetdb-users mailing list archive at Nabble.com.
On Tue, Jan 29, 2008 at 12:18:51PM -0800, sateesh wrote:
The Syntax only works in the default schema.
If i try to alter a table in a user created schema then it's throwing the same Error "Table Doesn't exists" !!!
Here is my Test Case..
[CODE]
create table tmp.collection_info( test_col varchar(100));
ALTER TABLE "tmp"."COLLECTION_INFO" ADD COLUMN test_col1 varchar(256);
ALTER TABLE tmp.COLLECTION_INFO ADD COLUMN test_col2 varchar(256);
ALTER TABLE "tmp"."collection_info" ADD COLUMN test_col3 varchar(256);
ALTER TABLE tmp.collection_info ADD COLUMN test_col4 varchar(256);
[/CODE]
Indeed you found a bug. The schema name wasn't used correctly. Fix is available in cvs head as we have plans for a release real soon. Added your example as an test case. The first of these alters (correctly) fails as double quoted identifiers are case sensetive. Niels
Regards Sateesh -- View this message in context: http://www.nabble.com/ALTER-TABLE-doesn%27t-work-in-MonetDB-%21%21-tp1516802... Sent from the monetdb-users mailing list archive at Nabble.com.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
On Tue, Jan 29, 2008 at 11:06:47PM +0100, Niels Nes wrote:
On Tue, Jan 29, 2008 at 12:18:51PM -0800, sateesh wrote:
The Syntax only works in the default schema.
If i try to alter a table in a user created schema then it's throwing the same Error "Table Doesn't exists" !!!
Here is my Test Case..
[CODE]
create table tmp.collection_info( test_col varchar(100));
ALTER TABLE "tmp"."COLLECTION_INFO" ADD COLUMN test_col1 varchar(256);
ALTER TABLE tmp.COLLECTION_INFO ADD COLUMN test_col2 varchar(256);
ALTER TABLE "tmp"."collection_info" ADD COLUMN test_col3 varchar(256);
ALTER TABLE tmp.collection_info ADD COLUMN test_col4 varchar(256);
[/CODE]
Indeed you found a bug. The schema name wasn't used correctly. Fix is available in cvs head as we have plans for a release real soon. Added your example as an test case. The first of these alters (correctly) fails as double quoted identifiers are case sensetive.
One more small remark. Using the 'tmp' schema is (should) be restricted for temp tables only (to be created via create temporary etc). Ie its better to use your own schema, which can be created via create schema schema_name; To switch to a different schema use set schema schema_name; Niels
Niels
Regards Sateesh -- View this message in context: http://www.nabble.com/ALTER-TABLE-doesn%27t-work-in-MonetDB-%21%21-tp1516802... Sent from the monetdb-users mailing list archive at Nabble.com.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
--
Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
Hi , Thanks for the help.. I was using my application specific schema. As an ex i used tmp schema. We got the new build and trying to setup the environment and will post back how this goes.. Regards Sateesh Niels Nes wrote:
On Tue, Jan 29, 2008 at 11:06:47PM +0100, Niels Nes wrote:
On Tue, Jan 29, 2008 at 12:18:51PM -0800, sateesh wrote:
The Syntax only works in the default schema.
If i try to alter a table in a user created schema then it's throwing
the
same Error "Table Doesn't exists" !!!
Here is my Test Case..
[CODE]
create table tmp.collection_info( test_col varchar(100));
ALTER TABLE "tmp"."COLLECTION_INFO" ADD COLUMN test_col1 varchar(256);
ALTER TABLE tmp.COLLECTION_INFO ADD COLUMN test_col2 varchar(256);
ALTER TABLE "tmp"."collection_info" ADD COLUMN test_col3 varchar(256);
ALTER TABLE tmp.collection_info ADD COLUMN test_col4 varchar(256);
[/CODE]
Indeed you found a bug. The schema name wasn't used correctly. Fix is available in cvs head as we have plans for a release real soon. Added your example as an test case. The first of these alters (correctly) fails as double quoted identifiers are case sensetive.
One more small remark. Using the 'tmp' schema is (should) be restricted for temp tables only (to be created via create temporary etc). Ie its better to use your own schema, which can be created via create schema schema_name; To switch to a different schema use set schema schema_name;
Niels
Niels
Regards Sateesh -- View this message in context:
http://www.nabble.com/ALTER-TABLE-doesn%27t-work-in-MonetDB-%21%21-tp1516802...
Sent from the monetdb-users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
--
Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
--
Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- View this message in context: http://www.nabble.com/ALTER-TABLE-doesn%27t-work-in-MonetDB-%21%21-tp1516802... Sent from the monetdb-users mailing list archive at Nabble.com.
participants (2)
-
Niels Nes
-
sateesh