Error while inserting a record in text table

View: New views
2 Messages — Rating Filter:   Alert me  

Error while inserting a record in text table

by gautam_m_rao :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys
  I am new to HSQL, i was just trying to create a record within a newly created table within HSQL

Following are the sql statements used
CREATE TEXT TABLE EMP(SRNO INTEGER,NAME VARCHAR)

insert into emp values(1,'sam')

I get the following errror

the tables data source has not been defined in the statement insert into emp

How do i associate the data source within the statement
is there a syntax?Please advice


Re: Error while inserting a record in text table

by lucky001 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

use the following command after creating the table and before inserting record into table.

SET TABLE EMP SOURCE "Location-of-Text-File"



gautam_m_rao wrote:
Hi guys
  I am new to HSQL, i was just trying to create a record within a newly created table within HSQL

Following are the sql statements used
CREATE TEXT TABLE EMP(SRNO INTEGER,NAME VARCHAR)

insert into emp values(1,'sam')

I get the following errror

the tables data source has not been defined in the statement insert into emp

How do i associate the data source within the statement
is there a syntax?Please advice