August 16, 2006, 07:56 AM
Animesh Vermahow to convert sql in WebFocus
hi
i want to know how to write these sql queries in WEBfocus.
1.SELECT * FROM MONTHLY_METRICS WHERE CORP_ID = 'A359946'
UNION
SELECT * FROM MONTHLY_METRICS WHERE NAME = ( SELECT DEF_SITE FROM PEOPLE_DIM WHERE CORP_ID = 'A359946' and end_dt is null)
2.SELECT * FROM MONTHLY_METRICS WHERE CORP_ID = 'A359946' and name like (select SUBSTR(emp_name, 1, INSTR( EMP_NAME, ' ' ) -1) || '%' from people_dim WHERE CORP_ID = 'A359946' and end_dt is NULL)
if someone can please help me out with this fast.i need the complete queries without using sql passthru.....it's kind of urgent
August 16, 2006, 08:10 AM
KaranthYou can use a match to achieve this.
Create 2 hold files, one each for the SQLs.
For the second one u can do the following:
1) Create a save file for the sub query
2) create a hold file for the main query and use the FILE IN clause.
Create a hold file for the first query (straight forward).
Match both.
August 23, 2006, 10:05 AM
KerryHi Animesh,
Is this topic the same as this resolved one,
How to convert SQL query into WebFocus query?
Cheers,
Kerry