As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I need to concatanate fields from SQL 2005 table. If I run the following code
DEFINE FILE TALERTS_SENT
FMT_JNUM/A12 = JOB_NUMBER;
FMT_SENTTO/A30 = SENT_TO;
END
SQL
SELECT FMT_JNUM+FMT_SENTTO FROM DW.TALERTS_SENT;
END
I get error - (FOC14014) OPERATOR + INCOMPATIBLE WITH OPERANDS (FMT_JNUM + FMT_SENTTO) Note that if I use just 1 field (FMT_JNUM or FMT_SENTTO) then it works fine. These fields are A12V and A30V in master file. I tried to change to A12 and A30 in master file as well as I tried to use DEFINE (see code above), but no luck. Thanks.
WF 7.6.4, Win XP, SQL 2005
Posts: 42 | Location: California | Registered: August 17, 2007
fields are A12V and A30V in master file. I tried to change to A12 and A30 in master file as well as I tried to use DEFINE (see code above), but no luck.
Perhaps replace the + with either a | or a double ||...
| - Will concatenate || - Will Concatenate and trim extra spaces
TABLE FILE CAR PRINT * COMPUTE TEST/A50 = COUNTRY | CAR; END
DEFINE FILE CAR
COUNTRYV/A40V = COUNTRY;
MODELV/A40V = MODEL;
CM/A80 = COUNTRYV || MODELV;
CMV/A80V = COUNTRYV || MODELV;
END
SQL
SELECT CM, CMV FROM CAR
END
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
Double || works. Thanks a lot for fast response. I did the same in SQL Server Query Editor with '+' sign and I assumed that I should use the same syntax in WebFocus SQL Translator.
WF 7.6.4, Win XP, SQL 2005
Posts: 42 | Location: California | Registered: August 17, 2007
The WebFOCUS translator may actually generate that code in the background. Don't have it handy at the moment, but you can run a fex with xtrieval off to see generated code.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Thanks a lot to everybody who replied. It works and right now I'm under non-negotiable deadline for this project, so I really don't have time to explore all suggestions. I found that on page 21-3 of "Creating reports with WebFocus language" it says that '||' should be used for concatenation, so I had to read manual. I just assumed that if it is called 'SQL Translator' then it should translate any query which runs in SQL. Thanks again to everybody.
WF 7.6.4, Win XP, SQL 2005
Posts: 42 | Location: California | Registered: August 17, 2007