[comp.databases] INFORMIX - SQL SELECT HELP

bobb@netcom.UUCP (Bob Beaulieu) (08/18/90)

I am fairly new to sql and in the process of converting informix 3.3 to
2.1.0 on a pyramid m1e and would appreciate HELP on an alias problem.

The existing (3.3) version has a CODE table which has 2 cols (code-num
and code-descrip). The codes are broken down to 3 sections: 1x,4x and 8x.

A perform screen has three sections where the codes are entered after
which a lookup function gets the description of the code entered.

In the non-sql version (3.3) 2 alias files where created BEFORE the
read into x statement:

alias tmp1code = code end
alias tmp2code = code end

then within the read into statement, "off-the-cuff" variables were used
to capture the descriptions:
descrip1 = tmp1code.code-descrip
descrip2 = tmp2code.code-descrip

Unfortunately, sql doesn't allow these "off-the-cuff" variables to be 
created, which makes converting this form quite difficult.

Is there an easy way to handle this with SQL?

Any advice as to if it would better to create 3 separate code tables
to handle this problem?

Thanks,
Bobb