Replace all table references with constant