Dynamic sql handling could be done but it will take some doing
maybe writing an extended procedure or simple writing a class inj c# or C++ and
call it from the script to parse it and return some info..
i dont dynamic sql, i have jobs which go check and then created
views based on some logic or bussiness rules
for example i have a very big and complicated view which returns
historicsal data is is really simpler to write dynamic sql but instead i
created a job that checks for certian things to changed and then the job
creates the view "yes is dynamic sql" but it makes a view out of it
and bingo so my code doe snot care it calls it and this way i dont need to embed
sql into my code
i think it wold be a nice article my code does something like this
check todays date and other things it asks Do I need to updated certain view?
yes and it goes and generates some big complex sql script but wraps it into a
basically my code updates the views and functions and stuff..
lets say there is a view whih uses some bussiness rule like
where cat=big and mouse=small and is rainnig
then the rule changed to cat=small and is sunny
my code goes and changes the view or sp and that is all
if you think about it you dont need dynamic sql alobe it could be put inside a procedure
as a matter of fact microsoft does this when you call dynammic sql
ms creates a temp view or sp and then calls it specially it you have arguments