Re: illegal character error with INSERT statement and &BIND
Posted in 1998
maroof_ahmed@peoplesoft.com wrote:
>
> Why do I get Informix error [-202] "An illegal character" at pos 00013 in the
> following INSERT line:
>
> INSERT INTO &BIND (
> TAO_GROUP,NOQUOTES)
>
> Is it because I have an empty space between &BIND and the left parenthesis? Or
> I have a carriage return after the left parenthesis? Or both?
>
> Thanks in advance for your reply.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
As others have said, the problem is the & in the &BIND (this is
character 13).
I suspect you may be assuming that Informix works like the Oracle SQL
front end product, which (if memory is working) uses the & to mean ask
the user for a value.
Informix doesn't work this way. If you want to substitute in your SQL
script before running it, you need to set up a Unix pipeline with a
filter to do the substitution like this:
my_sub_filter <myfile.sql | dbaccess mydatabase
--
Peter Lancashire
Information Systems Specialist, Bayer plc
Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK
Tel: +44-1635-562258, Fax: +44-1635-562281
--
If all else fails, read the instructions and the release notes.
Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/