Hi, When using monetdb, one questions that I need your suggestions is how to load a table column to MAL client and manipulate it.For example,sql>create table gzhang_test (intcol1 int,varcharcol1 varchar(50));sql>insert into gzhang_test values (1,'value1'); sql>insert into gzhang_test values (2,'value2');I know how to load a BAT by name in MAL, but for this table, I don't know how to get the name.If I do:mal>X_3 := sql.mvc();mal>X_4:bat[:oid,:int] := sql.bind(X_3,"midas","gzhang_test","intcol1",0); mal>io.print(X_4);I will get ERROR = !SQLException:mvc:SQL module not initialized. Should I load the SQL module in a MAL session, what's the correct way to get the column if not? Thanks,George Zhang _______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
On 22-10-2012 19:18:15 -0700, Liwen -George- Zhang wrote:
mal>X_3 := sql.mvc();
mal>X_4:bat[:oid,:int] := sql.bind(X_3,"midas","gzhang_test","intcol1",0);
mal>io.print(X_4);
I will get ERROR = !SQLException:mvc:SQL module not initialized. Should I load the SQL module in a MAL session, what's the correct way to get the column if not?
Use the "msql" language (mclient -lmsql), that should initialise the SQL context, so you can get a initialised mvc from sql.mvc(); Fabian _______________________________________________ users-list mailing list users-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/users-list
participants (2)
-
Fabian Groffen
-
Liwen -George- Zhang