Focal Point
Using Hold File in Where Clause

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

November 30, 2006, 04:39 PM
spdam0
Using Hold File in Where Clause
I am having problems using a hold file in a where clause. This is my code

-SET &&REPORTGROUP = 'WATS Stores';
TABLE FILE T_ACC_PCAT_TICKET_BUCKETS
PRINT
BUCKET_NUMBER
WHERE (TEAM_N EQ '&&REPORTGROUP') OR (GROUP_N EQ '&&REPORTGROUP') OR (DEPT_N EQ '&&REPORTGROUP');
ON TABLE HOLD FORMAT BINARY
END
TABLE FILE T_ORA_CPR_TECH_PROB
SUM
CNT.TECH_PROB_I AS 'Total'
IN_INBOX AS 'Inbox'
BY GRP_N AS ' '
ACROSS STATUS AS ' '
WHERE ASGN_GRP_I IN FILE HOLD;

This does not work. The data in the hold file is correct though. It has 3 values in it and if I were to plug those values directly into the where statement I get the results that I want.

I have another example where this does work if I use the following statement
WHERE NOT ASGN_GRP_I IN FILE HOLD; but I can not use that in this report because the number of ASGN_GRP_I in the database changes constantly
November 30, 2006, 04:52 PM
Francis Mariani
1) Why FORMAT BINARY? Have you tried FORMAT ALPHA?

2) If the values have blanks in them, you need to create a HOLD file with single quotes around the value.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server