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     [closed] Need help with MODIFY syntax

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[closed] Need help with MODIFY syntax
 Login/Join
 
Platinum Member
posted
I need to load some data from Oracle to SQL Server. The dataset is as simple as this:

Source:
DATE_ORA (DATETIME), SEC_ORA (A10), VAL_ORA (D10.4)

Target:
DATE_SQL (DATETIME), SEC_SQL(A10), VAL_SQL (D10.4)


In both tables, the first 2 columns are primary key.

Here is my code:

quote:


TABLE FILE SOURCE_ORA
PRINT
DATE_ORA
SEC_ORA
VAL_ORA
ON TABLE HOLD AS TEMP_HOLD
END
-RUN


MODIFY FILE TARGET_SQL
FIXFORM FROM TEMP_HOLD
MATCH
???
ON MATCH UPDATE
ON NOMATCH INCLUDE
DATA ON TEMP_HOLD
END
-RUN


I have tried putting both source or target fields in MATCH clause, none works out. Can someone please help me with the syntax?

Thanks.

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


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
You should put the key fields in the MATCH statement.

MATCH DATE_SQL SEC_SQL

But you will need to have all the fields match the target fields, if you use FIXFORM FROM TEMP_HOLD, or add a COMPUTE to the MODIFY assigning the fields before the match


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Hi BUG!
Try this:
  
TABLE FILE SOURCE_ORA
PRINT
DATE_ORA AS DATE_SQL 
SEC_ORA AS SEC_SQL
VAL_ORA AS VAL_SQL
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS TEMP_HOLD
END
-RUN
MODIFY FILE TARGET_SQL
FIXFORM FROM TEMP_HOLD
MATCH DATE_SQL SEC_SQL
ON MATCH UPDATE VAL_SQL
ON NOMATCH INCLUDE
DATA ON TEMP_HOLD
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
Hi Danny, your code works!

The reason mine did not work was:

1. There are extra columns in my data file, need to add SET HOLDLIST=PRINTONLY;

2. Column names are not the same. I did not know you have to have matching column names in both source and target table.

Thanks!


7.66 and 7.704
System: Windows / AIX / Linux
Output: Mostly HTML, with some PDF, Excel and Lotus(!)
 
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005Report This Post
Expert
posted Hide Post
Logically, if you think about it, how will it know what field is used where.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 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     [closed] Need help with MODIFY syntax

Copyright © 1996-2020 Information Builders