Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Task error: ERROR IN SCALAR FUNCTION SUBSTR - FIRST PARAMETER IS NOT A STRING

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Task error: ERROR IN SCALAR FUNCTION SUBSTR - FIRST PARAMETER IS NOT A STRING
 Login/Join
 
Member
posted
Hi all,

I have a scheduled job that has this code:
SUBSTR(LC.COMMENTS, 1, 50) LINESUBCOMMENT

but it's getting this error:
Task error: ERROR IN SCALAR FUNCTION SUBSTR - FIRST PARAMETER IS NOT A STRING

How do I write scalar functions?

Thanks


Webfocus 5.3.4, Unix, Oracle DB, Apache Tomcat
 
Posts: 9 | Location: Irving, TX | Registered: October 30, 2007Report This Post
Member
posted Hide Post
quote:
I have a scheduled job that has this code:
SUBSTR(LC.COMMENTS, 1, 50) LINESUBCOMMENT

but it's getting this error:
Task error: ERROR IN SCALAR FUNCTION SUBSTR - FIRST PARAMETER IS NOT A STRING

How do I write scalar functions?


Also, here's the entire SQL statement.

SQL
SELECT

W.INSTALL_START_DATE,

P.PO_SUBMIT_DATE,
P.VENDOR_PROMISE_SHIP_DATE,
P.VENDOR_CODE,
P.VENDOR,

L.CUSTOMER_ID,
L.WO_NUMBER,
L.PO_NUMBER,
L.LINE_NUMBER,
L.LINE_REV_NUMBER,
L.MFG_PART_NUMBER,
L.EQPT_DESC,
L.BOM_FLAG,
L.QUANTITY,
SUBSTR(LC.COMMENTS, 1, 50) LINESUBCOMMENT

FROM
M_WORK_ORDER W,
M_PURCHASE_ORDER P,

M_LINE_ITEMS L LEFT JOIN M_LINE_COMMENTS LC
ON L.CUSTOMER_ID = LC.CUSTOMER_ID
AND L.WO_NUMBER = LC.WO_NUMBER
AND L.PO_NUMBER = LC.PO_NUMBER
AND L.LINE_NUMBER = LC.LINE_NUMBER


Webfocus 5.3.4, Unix, Oracle DB, Apache Tomcat
 
Posts: 9 | Location: Irving, TX | Registered: October 30, 2007Report This Post
Master
posted Hide Post
You need SQL SQLORA or SQL SQLMSS NOT SQL on its own otherwise you DO NOT pass native SQL through the adapter.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
Unless you have the
SET SQLENGINE=SQLMSS/SQLORA/DB2
statement before the SQL SELECT statement.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
Good point Mr Mariani

I checked also that its not a null value input to a SCALAR function (one that is not SUM. CNT. AVE. etc) and although math operators baulk at nulls scalar functions do not.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Task error: ERROR IN SCALAR FUNCTION SUBSTR - FIRST PARAMETER IS NOT A STRING

Copyright © 1996-2020 Information Builders