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    [SOLVED] DMC : DB_EXPR(NEWID()) 'Non Optimizable'

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] DMC : DB_EXPR(NEWID()) 'Non Optimizable'
 Login/Join
 
Silver Member
posted
I'm creating a flow in the Data Management Console and am running into an issue I can't seem to find answers on.

The field I'm working with is a 'UniqueIdentifier' field according to SQL, which DMC recognizes as A38.

I want SQL to generate a new guid when I insert a row, so in the expression box for this field I enter the command DB_EXPR(NEWID()). SQL has a command (NEWID()) which generates a new guid.

When I Test Transforms, I get the following error message :

0 ERROR AT OR NEAR LINE 41 IN PROCEDURE __WCFEX FOCEXEC *
(FOC32605) NON OPTIMIZABLE EXPRESSION WITH SQL SPECIFIC SYNTAX: DB_EXPR

Can someone tell what I'm doing wrong here?

(Edit: iWay Version 8)

This message has been edited. Last edited by: Tamra,


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
 
Posts: 40 | Location: Kansas City, MO | Registered: June 10, 2013Report This Post
Silver Member
posted Hide Post
I think your DEFINE field should be anchored to real field.
Try using DEFINE XXXX/AXX WITH << "existing table field ">>


WebFOCUS 8
Windows, All Outputs
 
Posts: 38 | Registered: July 25, 2016Report This Post
Guru
posted Hide Post
Avatar is correct, assuming that your transformation is a Source Transformation. In that case if you tested the transformation from the Calculator you would get the somewhat more helpful error:

(FOC36343) SQL SPECIFIC SYNTAX CANNOT BE USED IN CONSTANT DEFINE DB_EXPR(NEWID()). WITH OPTION IS REQUIRED.

To do so from the Calculator press the ellipses after the Format, then scroll down to WITH and select a field.

Alternatively instead of using a Source Transformation you could add the calculation in the Column Selection panel in the SQL Calculator.

But from your description it sounds like you may be attempting this in a Target Transformation. If so, don't. Use one of the two alternatives above.


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Silver Member
posted Hide Post
Thank you both for the suggestions, they're both helpful.

I think the approach that I would like to take is adding the calculation in the Column Selection Panel.

currently the Sql Expression is 'T1.READ_ID'.

With my low skill-level, I was hoping that:
'SET FIELDNAME = NEWID()'
in the Expression box of the Column Selection Panel in the SQL Calculator screen would get the job done, but it errors out w/ a syntax error, so not sure what I'm missing.

Unless one of you fine gentlemen have a simple answer, I'll look into some documentation for this tool.


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
 
Posts: 40 | Location: Kansas City, MO | Registered: June 10, 2013Report This Post
Guru
posted Hide Post
In the SQL Calculator

Alias: READ_ID
Expression: DB_EXPR(NEWID())

This message has been edited. Last edited by: Clif,


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Silver Member
posted Hide Post
Thanks for making that grade-school simple for me. I was thinking that I could use SQL Directly, removing the need for the DB_EXPR command.

W/ the exception of the underscore in New_ID, it worked perfectly (I only mention this trivial change in case someone as ignorant as myself happens upon this issue in the future).

Thanks Clif!


WebFOCUS 8.2.0.1 / App Studio 8.2.0.1 (04092014) / Windows 7 / HTML5, PDF, XLS
 
Posts: 40 | Location: Kansas City, MO | Registered: June 10, 2013Report 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    [SOLVED] DMC : DB_EXPR(NEWID()) 'Non Optimizable'

Copyright © 1996-2020 Information Builders