Skip to Content
0
Former Member
Jan 28, 2009 at 01:14 PM

Store data in a table which only one report can write in?

51 Views

Hi,

Here is my scenario

A report which gathers data is going to run each day. It is going to select data where date_column of the table is bigger or equal to report_last_run_date.

So I want to store the report_last_run_date somwhere in the database. Can I store this as a system variable or do I have to create my own table just to store one date?

Problem

I dont want anyone else compromise security by having the chance to alter report_last_run_date field. Because imagine someone created a second report and did:

Update some_table

Set report_last_run_date = 1899

This would ruin the report which gathers data based on when it was last run.

So I want to make sure the field or system variable or whatever I can store the last_run_date i secure and can only be written to from the data gathering report. How do I solve this?

thanks!

Edited by: Baran Sölen on Jan 28, 2009 2:15 PM