Hi All,
I’m wondering if someone already develop a simple query based in replication metadata to retrieve the subscription where clause string.
If yes do you mind to shared it 😀
i have a proc to do do this but looks me super complex to adapt to a normal sql query
Thanks
Joao
NOTE: You should probably post these types of questions as a ‘discussion’ (not as a ‘document’).
There is no ‘simple’ query for reverse engineering a subscription ‘where’ clause.
Your best bet is to look at the source code for rs_helpsub and rs_subddl (called by rs_helpsub). These should contain all the logic for reverse engineering the DDL (including the ‘where’ clause) for a given sub.
hi mark,
thanks for feedback .
the complexy of rs_subddl for where clauses is quite hard to make simple but i will try anyway.
thanks for your feedback
regards
Joao
Sounds like an excellent candidate for an “Ed Barlow” stored procedure IMO
FWIW, cutting-n-pasting the important parts from rs_subddl is relatively easy (as opposed to reinventing the wheel).