Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding records inactive records from tables.
Message
From
15/01/2004 11:25:17
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Excluding records inactive records from tables.
Miscellaneous
Thread ID:
00867151
Message ID:
00867151
Views:
60
I have about 200 tables in a MS SQL Server database and each table has a field called 'Record_status'. When Record_Status is null the record is considered as an 'active record'. Whenever I send a SQL statement to the server, I add an additional condition with WHERE clause. Example:

Select a.*, b.*, c.* from tbl1 a, tbl2 b, tbl3 c where ......... and not isnull a.record_status and not isnull b.record_status and not isnull c.record_status....

Can somebody advise me how to build a rule at the server level so that SQL engine does not include inactive records from each table when a SQL statement is parsed? I am looking for a solution other than Views (SQL Views).
Reply
Map
View

Click here to load this message in the networking platform