[comp.databases] double quotes in Informix fields

peb@trac2000.ueci.com (Paul Begley) (06/26/91)

We have a significant number of applications which collect engineering
data.  We have been living with the problem of double quotes in
character fields - Informix loses its mind and will not handle it in a
'normal' (to the engineer) fashion.

Any thoughts?

We are using OnLine engine and 4GL release 4.00 with all our
applications using compiled 4GL (versus interpreted).

aland@informix.com (Colonel Panic) (06/29/91)

In article <1040@trac2000.ueci.com> peb@trac2000.ueci.com (Paul Begley) writes:
>We have a significant number of applications which collect engineering
>data.  We have been living with the problem of double quotes in
>character fields - Informix loses its mind and will not handle it in a
>'normal' (to the engineer) fashion.

Huh?

Don't know what you mean by "the problem of double quotes in character
fields".  Double quotes can be embedded in character fields/columns
just fine.

>Any thoughts?
>
>We are using OnLine engine and 4GL release 4.00 with all our
>applications using compiled 4GL (versus interpreted).

Perhaps you're forgetting the distinction between double quotes as
*contents* and double quotes as *delimiters*.  Since 4GL uses double
quotes to delimit strings, you have to escape them (or use the
ASCII function) to embed them in a string.

For example, to have a char variable which has it *contents* include
leading and trailing character strings:

    let charvar = "here is the string"

will interpret the double quotes as delimiters.  The easiest way
to embed is to use the ascci function, e.g.

    let charvar = ascii 34, "here is the string", ascii 34

or, you can escape the quotes with doubling them ("") or quoting
them (\").

Hope this helps.

--
Alan Denney      aland@informix.com      {pyramid|uunet}!infmx!aland

"The biggest problem with baseball today is the money being thrown
around.  The players aren't in the sport for the joy of the game
anymore, they're in it for the money.  Greed is ruining baseball."
     - Rogers Hornsby (when Cincinatti Reds manager), 1953