×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to update a database with totals from the report

How to update a database with totals from the report

How to update a database with totals from the report

(OP)
Hi All,
  I need to update the database with the totals from a report. I am using WebFOCUS 4.36 and ReportCaster. We have a J2EE self service app that calls ReportCaster and then ReportCaster is supposed to generate a bill and for each bill I need to write the total back to the database. Is this possible?

RE: How to update a database with totals from the report

What TYPE of database are you reading, that you then need to update?

RE: How to update a database with totals from the report

(OP)
I am updating an Oracle 8i database. What I would like to do is to run my report and as a total is calculated for each report, have the total written to a file and then maybe have a post process run that reads the file and then updates the Oracle database....

RE: How to update a database with totals from the report


Simple.
 As long as you have a master file description and access file for your oracle table (ie oracletb.mas oracletb.acx) then you can create a simple modify to update the database.  In the example below, field1, field2, field3 make up the unique key to the table (as defined in the oracle database).  Just create a hold file with all the elements needed to update the table in your database database.

Hope this helps....

-* NOTE oracledb should be the name associated to the
-* connection string in sqlnet for the oracle database

SQL SQLORA SET USER useid/password@oracledb


TABLE FILE REPTDATA
PRINT field5 field6 field7
by field1
by field2
by field3
ON TABLE HOLD AS savedata
END

MODIFY FILE oracletb
FIXFORM FROM savedata
MATCH field1 field2 field3
ON NOMATCH INCLUDE
ON MATCH UPDATE field5 field6 field7
DATA ON savedata
END

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close