I have 3 tables namely master, Trans and archive. Master table contains all the records. Trans table contains records which are issued to any user where as Archive table contains the records which are above 90 days old.
Table structure is as follows.
Master Table -> Document type, Document number, document serial number, description, receive_date.
Trans Table Trans ID , Trans type , Doc num , Issue Date, Return date, issued to , issued by.
Archive Table it contains all the fields as that of master table except archive_number. (All those records which crosses 90 days limit in master table get transferred to archive table).
I have a form that contains 2 textbox, 2 labels and 1 command button. The form is basically a search form that helps to search record from database.
What I need is when a user click on submit button the record will first search in archive table. If record exist is archive table then user will get a message “Records archive under archive number <value of archive number>”. In case if the record is not available in archive table then it ill search in Trans table. If record exists in Trans table then user will get a message “Record already issued”. If records do not exist in Archive and Trans table then it will show the record from master table.
Appreciate any help on this.
Table structure is as follows.
Master Table -> Document type, Document number, document serial number, description, receive_date.
Trans Table Trans ID , Trans type , Doc num , Issue Date, Return date, issued to , issued by.
Archive Table it contains all the fields as that of master table except archive_number. (All those records which crosses 90 days limit in master table get transferred to archive table).
I have a form that contains 2 textbox, 2 labels and 1 command button. The form is basically a search form that helps to search record from database.
What I need is when a user click on submit button the record will first search in archive table. If record exist is archive table then user will get a message “Records archive under archive number <value of archive number>”. In case if the record is not available in archive table then it ill search in Trans table. If record exists in Trans table then user will get a message “Record already issued”. If records do not exist in Archive and Trans table then it will show the record from master table.
Appreciate any help on this.