
Originally Posted by
tynum
tnx bro... i appreciate ur help.... basta ang thought ra jud ani bro kay bale mo monitor ni xa sa mga scripts na ni run...
steps:
1. run scripts...... from
scripts table...
2. log script being run to
script_run table..... logs script_id, starts(datetime), ends(datetime)..
3. if there is an error while running the script( like server down, poor coding, etc. ) logs script_id, reason, date_created(datetime when error ocurred) to
script_error table...
my job:
1. get script_id from scripts table
2. looks into script_run table where script_id is equal to script_id in no.1
3. for every match in no.2 look into script_error table if there is an error while running that script at that time (starts, ends)
4, displays script_error_id, starts, ends, error(yes/no) via gridview in asp.net... script_error_id column kay hyperlinks ni sila na ma click aron ma view ang reason of error if any....
my problem:
unsaon jud nku para ma display nku c error column as either YES or NO... depending if that script errored on the time when it was run...
OK ba ako explaination

nka sabot na jud

error column ra ako problema... its for the end users....
hear me out

, if the script(based on script id)has more than one occurance then that script has an error?
looks like script run table is the occurance table(has scripts_id as a FK)and scripts table has the script_id as the PK.
i would in the script table where script_id(PK) has 2 fields in the table(suggestion) IsError, IsOK..
when SQL runs check Occurance Table is more than 1 then update Script table with IsError marked 1 for false and IsOk 0
but since your table is based on finding out when the script run occurance is the error. you might have an field for marking it as error =1 , error = 0 would be no, it will be easier when binding it sa datagrid to know if its a yes or no.
another idea would be to use join nalang with each statement to findout kinsa ang YES or NO, which just a declared field sa SQL to have YES or NO,