How to know if a Temp-Table is defined

Hi everyone, i know that might seem weird but i have an Include that is used in a procedure all arround my system.

This procedure checks validity of data.

One point is that i can't get it to check the content of a temp-table as well as this static temp-table is not always defined! It depends on where it's beeing created.


Therefore if i'm creating The employee's through my Employer screen, i'm creating them in a temp-table.
If i'm creating The Employee through the Employee screen, i'm not.

Those 2 cases need the same validations but one of them uses a temp-table and not the other.

I know SQL has a IF Exists command. Is there anything in progress that can tell me if a static temp-table is defined without sending a parameter?
 
You could do this with a preprocessor, but I wouldn't. It smacks of throwing things at a wall to see what sticks. Consistency and encapsulation should avoid the whole issue and produce more maintainable code.
 
It smacks of throwing things at a wall to see what sticks. Consistency and encapsulation should avoid the whole issue and produce more maintainable code.

Agree.
Just put your static temp-table in {mysystem.i} and place this include as first line of your program to make sure it always defined.
 
Back
Top