Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     how to use sql in focus???? Part II
Go
New
Search
Notify
Tools
Reply
  
how to use sql in focus???? Part II
 Login/Join
 
<beginner>
posted
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!!!!
 
Reply With QuoteReport This Post
<Grzegorz>
posted
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>,
 
Reply With QuoteReport This Post
<beginner>
posted
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!!!
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     how to use sql in focus???? Part II

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.