Re: HOW TO PREPARE A LOAD STATEMENT
Posted in 1995
> Article: 21391 of comp.databases.informix
> Path:
> cix.compulink.co.uk!news.compulink.co.uk!btnet!newsfeed.internetmci.com!
> swrinde!cssun.mathcs.emory.edu!cssun.mathcs.emory.edu!not-for-mail
> From: dil@psi.ernet.in (dilip kumar biswal)
> Newsgroups: comp.databases.informix
> Subject: HOW TO PREPARE A LOAD STATEMENT
> Date: 4 Dec 1995 15:18:04 -0500
> Organization: Mailing List Gateway
> Lines: 26
> Sender: walt@mathcs.emory.edu
> Distribution: world
> Message-ID: <49vl1s$442@cssun.mathcs.emory.edu>
> Reply-To: dil@psi.ernet.in (dilip kumar biswal)
> NNTP-Posting-Host: cssun.mathcs.emory.edu
> X-Informix-List-ID: <list.8129>
>
> Hi Informixusers,
>
> May I know from you whether a load/unload statement can be
> prepared ?
>
> ATTEMPT :
>
> PREPARE load_stmt FROM "LOAD FROM ? INSERT INTO ?"
>
> RESULT :
> Error no 201 encountered.
>
> The mannual also says that it is impossible to prepare a LOAD stmt.
>
> The requirement is :
>
> I receive unloaded ascii files from different branch offices of a bank
> and I want to load them to their respective tables through a 4GL
> program.
>
> Is there any work arounds ?
Yes, don't use prepare. The following code works for me:-
LET selstmnt = "INSERT INTO ", tabl_name CLIPPED
LOAD FROM filename selstmnt
You can do the same thing with UNLOAD.
Regards,
David. N. Heydon
LANGDON SYSTEMS LTD
>
>
> Thanks in advance,
>
>
>
> DILIP KUMAR BISWAL