simple load from insert into question
Posted in 2009
Topics: General Discussion
I'm doing a simple load from file, insert into table command:
load from '<file name>'delimiter ","
insert into <table name>
(action_cd,actl_ann,actl_daily,actl_days,actl_hrly,actl_hrs,actl_per,apprv_cd01,
assg_stat,as_of_date,base_mnths,calc_beg,calc_end,calc_per,calendar,daily_calc,d
flt_days,dflt_hrs,entity_id,fq,id,indx_key,no_periods,optioncode,override,ov_day
hrs,payclass,pay_beg,pay_end,pay_stat,pcn,pcn_effort,pcn_fte,position,proratesal
,ratio_amt,ratio_fact,reas_cd,reas_desc,rec_type,reg_rate,tot_fte,barg-unit,depa
rtment,fiscalyr,patch_type,py_send,spec_cd01,rectype,gl_ledger,gl_key,gl_obj,per
cent,misc)
and getting:
404: The cursor or statement is not available
I've set the DELIMIDENT environment variable (although I'm not using spaces in
the columns or table name), verified that the file is readable and has the
proper amount of data per columns I'm inserting into. I've also tried changing
the delimiter to a pipe. The error is pointing to the 'load' statement, so no
columns have begun to load. I'm guessing this is something simple, any
direction is appreciated.
TIA
Hi Dan
What is your server's version? What is your sample data looks like?
Have you tried to use same syntax to load couple lines of sample data to a
simple table. (eg, load two rows to a table only have two columns).
Does it work if you run it from dbaccess?
Regards,
-Ping Tang
--- On Mon, 3/23/09, D H <dan.hess@sungardps.com> wrote:
> From: D H <dan.hess@sungardps.com>
> Subject: simple load from insert into question [15297]
> To: ids@iiug.org
> Date: Monday, March 23, 2009, 5:09 PM
> I'm doing a simple load from file,
> insert into table command:>
> load from '<file name>'> delimiter ","
> insert into <table name>
>
>
(action_cd,actl_ann,actl_daily,actl_days,actl_hrly,actl_hrs,actl_per,apprv_cd01,
assg_stat,as_of_date,base_mnths,calc_beg,calc_end,calc_per,calendar,daily_calc,d
flt_days,dflt_hrs,entity_id,fq,id,indx_key,no_periods,optioncode,override,ov_day
hrs,payclass,pay_beg,pay_end,pay_stat,pcn,pcn_effort,pcn_fte,position,proratesal
,ratio_amt,ratio_fact,reas_cd,reas_desc,rec_type,reg_rate,tot_fte,barg-unit,depa
rtment,fiscalyr,patch_type,py_send,spec_cd01,rectype,gl_ledger,gl_key,gl_obj,per
cent,misc)
>
>
> and getting:
>
> 404: The cursor or statement is not available>
> I've set the DELIMIDENT environment variable (although I'm
> not using spaces in
> the columns or table name), verified that the file is
> readable and has the
> proper amount of data per columns I'm inserting into. I've
> also tried changing
> the delimiter to a pipe. The error is pointing to the
> 'load' statement, so no
> columns have begun to load. I'm guessing this is something
> simple, any
> direction is appreciated.
>
> TIA
>
>
>
*******************************************************************************
>
> Forum Note: Use "Reply" to post a response in the
> discussion forum.
>
>
Could it be permission issue?
The person who created this table has not granted Update privilege to
your account name or to the public. The owner of the table or the DBA
must grant this privilege before you can update a row in this table.
-404 The cursor or statement is not available.
One of the following four situations occurred:
You used a statement that names a cursor that was released with the
FREE statement or that was released during a failed automatic re-prepare.
Review the program logic and check that the cursor specified is declared
and opened, but not freed, prior to reaching this statement.
If the error occurred on a command that specifies a variable rather than a
cursor, the statement was not prepared before you tried to execute it.
The cursor or statement is not available because the connection to the server
does not exist or was lost.
The person who created this table has not granted Update privilege to
your account name or to the public. The owner of the table or the DBA
must grant this privilege before you can update a row in this table.
--- On Mon, 3/23/09, D H <dan.hess@sungardps.com> wrote:
> From: D H <dan.hess@sungardps.com>
> Subject: simple load from insert into question [15297]
> To: ids@iiug.org
> Date: Monday, March 23, 2009, 5:09 PM
> I'm doing a simple load from file,
> insert into table command:>
> load from '<file name>'> delimiter ","
> insert into <table name>
>
>
(action_cd,actl_ann,actl_daily,actl_days,actl_hrly,actl_hrs,actl_per,apprv_cd01,
assg_stat,as_of_date,base_mnths,calc_beg,calc_end,calc_per,calendar,daily_calc,d
flt_days,dflt_hrs,entity_id,fq,id,indx_key,no_periods,optioncode,override,ov_day
hrs,payclass,pay_beg,pay_end,pay_stat,pcn,pcn_effort,pcn_fte,position,proratesal
,ratio_amt,ratio_fact,reas_cd,reas_desc,rec_type,reg_rate,tot_fte,barg-unit,depa
rtment,fiscalyr,patch_type,py_send,spec_cd01,rectype,gl_ledger,gl_key,gl_obj,per
cent,misc)
>
>
> and getting:
>
> 404: The cursor or statement is not available>
> I've set the DELIMIDENT environment variable (although I'm
> not using spaces in
> the columns or table name), verified that the file is
> readable and has the
> proper amount of data per columns I'm inserting into. I've
> also tried changing
> the delimiter to a pipe. The error is pointing to the
> 'load' statement, so no
> columns have begun to load. I'm guessing this is something
> simple, any
> direction is appreciated.
>
> TIA
>
>
>
*******************************************************************************
>
> Forum Note: Use "Reply" to post a response in the
> discussion forum.
>
>
2009/3/23 D H <dan.hess@sungardps.com>:
> I'm doing a simple load from file, insert into table command:
>
> load from '<file name>'> delimiter ","
> insert into <table name>
>
>
(action_cd,actl_ann,actl_daily,actl_days,actl_hrly,actl_hrs,actl_per,apprv_cd01,
assg_stat,as_of_date,base_mnths,calc_beg,calc_end,calc_per,calendar,daily_calc,d
flt_days,dflt_hrs,entity_id,fq,id,indx_key,no_periods,optioncode,override,ov_day
hrs,payclass,pay_beg,pay_end,pay_stat,pcn,pcn_effort,pcn_fte,position,proratesal
,ratio_amt,ratio_fact,reas_cd,reas_desc,rec_type,reg_rate,tot_fte,barg-unit,depa
rtment,fiscalyr,patch_type,py_send,spec_cd01,rectype,gl_ledger,gl_key,gl_obj,per
cent,misc)
>
> and getting:
>
> 404: The cursor or statement is not available>
> I've set the DELIMIDENT environment variable (although I'm not using spaces
in
> the columns or table name), verified that the file is readable and has the
> proper amount of data per columns I'm inserting into. I've also tried
changing
> the delimiter to a pipe. The error is pointing to the 'load' statement, so no
> columns have begun to load. I'm guessing this is something simple, any
> direction is appreciated.
>
> TIA
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
You don't say which tool you are using, but this I've seen this error
when attempting to use transactions on a non-logged database. Is you
DB logged? and is the tool you are using wautomagically wrapping you
statements in transactions?
Keith
Thanks for the responses. I spoke with the author of the data file, it appears
that it's data related.
I was trying to do the load thru dbaccess.