Re: ISQL & Multiple Problem
Posted in 1996
Don,
Your question is a bit vague - what kind of "trouble" are you
having? If your example is accurate, then it looks like you need to
place the values you're selecting into program variables. You can't
just mention column names in a select statement and assume they will
be understandable later on. Instead, you need to explicitly select
them into program variables of you own. For example, in 4GL you
would:
DEFINE var1 INTEGER
DEFINE var2 INTEGER
SELECT tablea.fielda, tablea.fieldb
INTO var1, var2
FROM tablea
PRINT var1 * var2 USING "######&"
Or, you could do the multiply as part of the select. That is:
DEFINE var1 INTEGER
SELECT tablea.fielda * tablea.fieldb
INTO var1
FROM tablea
PRINT var1 USING "######&"
On 23 Mar 1996 15:49:29 GMT, you wrote:
>I have a trouble with this concept of programming using ISQL (feb 94)
>I try to use values of data fields (integer) to be multiple together to print
>the answer.
>Here what I did...
>
>database
> .
>snip
> .
>select
> tablea.fielda,
> tablea.fieldb
> from tablea
>end
> .
>snip
> .
>on every row
======================================================================
Craig Kickel | Unix/C/Database Consultant
ckickel@cyberhighway.net | <This space intentionally left blank>
======================================================================