Focal Point
how to use sql in focus???? Part II

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7641077331

March 22, 2004, 12:34 PM
<beginner>
how to use sql in focus???? Part II
Refer to topic "how to use sql in focus????"

what if I need all fields in table 2, which were not mentioned earlier. And in column MOBILE (or NUMBER*), I need either phone_no (FROM TABLE1) or mobile_no if group number is 2 or 1, respectively?

TABLE2
STUDENT GROUP NUMBER* BLA BLA BLA...
A 1 999-8888 .... .... ....
B 2 333-4578 .... .... ....
C 1 999-7777 .... .... ....

I am frustrated now, been working on this for two days and not so productive Frowner Frowner

HELP ME!!!!
March 22, 2004, 12:56 PM
<Grzegorz>
OK.
Using FOCUS only:
1. First create the synonyms (using web console), or:

CREATE SYNONYM TABLE1 FOR TABLE1 DBMS SQLORA
END
CREATE SYNONYM TABLE2 FOR TABLE2 DBMS SQLORA
END[/code]and, creating the report:

JOIN CLEAR *
-*
JOIN STUDENT AND GROUP_ID IN TABLE1
TO STUDENT AND GROUP_ID IN TABLE2 AS J1
END
-RUN
DEFINE FILE TABLE1
NUMBER/A8 = IF GROUP_ID EQ '1' THEN MOBILE_NO ELSE PHONE_NO;
END
TABLE FILE TABLE1
PRINT NUMBER
-* ...
TABLE2.OTHERCOLUMN
-* ...
BY STUDENT
BY GROUP_ID
END

This message has been edited. Last edited by: <Mabel>,
March 23, 2004, 01:08 AM
<beginner>
I put
CREATE SYNONYM TABLE1 FOR TABLE1 DBMS SQLORA
END
CREATE SYNONYM TABLE2 FOR TABLE2 DBMS SQLORA
END

it gave me

(FOC001) THE NAME OF THE FILE OR THE WORD 'FILE' IS MISSING

I tried to put 'FILE' many places, still gave me error!!!