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  iWay Software Product Forum on Focal Point    SQL RIGHT FUNCTION USED IN SELECT STATEMENT

Read-Only Read-Only Topic
Go
Search
Notify
Tools
SQL RIGHT FUNCTION USED IN SELECT STATEMENT
 Login/Join
 
Member
posted
Hi, In a flow, I am trying to use RIGHT function in SQL select statement for the source, as:

SELECT
T1.INV_POST_DATE ,
T1.ACTIVITY_DATE ,
RIGHT(RTRIM(T1.SENDER_ID ), 3) AS TEST,
T1.STORE_NUMBER
FROM
nwest_daily_inv T1

However, Data Migrator throws an error: (FOC14069) SQL SYNTAX ERROR ON LINE 14 AT '('

Interestingly enough, there is no line 14 in that select statement.

The above SELECT statement works fine in DB2, but not in Data Migrator Is there a different syntax for using RIGHT function in Data Migrator?


WebFOCUS 7.7, iWay Data Migrator, Windows
Excel, PDF, HTML, XML
 
Posts: 19 | Registered: March 19, 2012Report This Post
Guru
posted Hide Post
While most common SQL functions are supported in what we used to call "EDA/SQL" some DB2 functions like RIGHT are not included. There's a list in the DataMigrator User's Guide.

However in the current production release 7.7.05 you can indicate a database specific function using the new function DB_EXPR.

 DB_EXPR(RIGHT(RTRIM(T1.SENDER_ID), 3) ) 


In prior releases you could use a DBMS SQL Flow to write dialectic specific SQL.


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Member
posted Hide Post
Thank you Clif.

In your statement "In prior releases you could use a DBMS SQL Flow to write dialectic specific SQL" do you refer to using data transformation on either source or target to get the final result as RIGHT function would have done?


WebFOCUS 7.7, iWay Data Migrator, Windows
Excel, PDF, HTML, XML
 
Posts: 19 | Registered: March 19, 2012Report This Post
Guru
posted Hide Post
No, I meant that you could use a DBMS SQL Flow.

Right click on an application directory and select New > DBMS SQL Flow. This special flow type has only a SQL object and target(s). Right click on the SQL object and select Properties to specify your adapter and connection. Then double click to open the SQL object where you can paste or write your DB2 SELECT statement.

Another alternative as you state is to write FOCUS transformations to achieve the same result. In fact in a source transformation could use this syntax to invoke the DB2 RIGHT function
SQL.RIGHT(RTRIM(T1.SENDER_ID),3)
However this at the cost of disabling automatic pass through (APT) which can adversely affect throughput.


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    SQL RIGHT FUNCTION USED IN SELECT STATEMENT

Copyright © 1996-2020 Information Builders