IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Insert Record to table in SQL server
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Gold member
Posted
I hold the file in the FEX and then I want to insert the hold file content to table in SQL server. How can I do that ?
 
Posts: 55 | Registered: May 15, 2004Reply With QuoteEdit or Delete MessageReport This Post
<Pietro De Santis>
Posted
Besides any WebFOCUS licencing issues, you can use MODIFY to update the SQL table

Something like:

MODIFY FILE table-name
FIXFORM FROM hold-file-name
MATCH key-field1 key-field2...
ON MATCH UPDATE *
ON NOMATCH INCLUDE
DATA ON hold-file-name
END

Or, you could use SQL pass-through.
 
Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
But how can I insert data from a HOLD file to the table in SQL server?

Please help !
 
Posts: 55 | Registered: May 15, 2004Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Ringo, If you are licensed to update database with WebFOCUS you can do what was suggested. Here's a more detail example using the famous car file and lets say that car2 is a SQL table that has the same fields and formats that I am printing and holding as HOLDCAR.

TABLE FILE CAR
PRINT DCOST RCOST
BY COUNTRY
BY CAR
BY MODEL
BY BODYTYPE
-*DEFAULT HOLD NAME IS HOLD WHEN AS IS NOT USED
ON TABLE HOLD AS HOLDCAR
END
-RUN
MODIFY FILE CAR2
FIXFORM FROM HOLDCAR
MATCH COUNTRY CAR MODEL BODYTYPE
ON MATCH UPDATE *
ON NOMATCH INCLUDE
DATA ON HOLDCAR
END
 
Posts: 610 | Location: Dallas, Texas | Registered: May 24, 2004Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
Thank you very much !
 
Posts: 55 | Registered: May 15, 2004Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
The absolutely easiest way to put a HOLD file into a relational database is to do it directly.
eg
TABLE FILE CAR
stuff
ON TABLE HOLD FORMAT ORACLE AS tabname
END
or whatever database you have (the keywords are in the doc). Remember that your id is probably going to be the first part of the table name in the rdbms when you look for it.
 
Posts: 197 | Registered: June 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
quote:
GeraldCohen wrote:
[qb] The absolutely easiest way to put a HOLD file into a relational database is to do it directly.
[/qb]
...but note that, at least with earlier releases (4.x) of WF, the column names for the resulting table will be the standard HOLD MFD aliases: E01, E02,....
 
Posts: 532 | Location: NYC | Registered: January 11, 2005Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Insert Record to table in SQL server

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.