FindViewByName etc
Sorry for the daft question but ....
FindViewByName etc takes three arguments llAName llASchema llADatabase
llAName and llADatabase I know for the view I am looking for
Would it be possible to make these commands work with a blank llASchema as I'm not sure how I would know this value in advance ?
I see there is a collection called DefaultSchemas but I'm not 100% sure how this could help me
Yes obviously on a test basis I can look in SSMS and see the schemas but how do I know more generically ?
Now that DefaultSchemas.Count etc work then I guess all I can do is loop though these calling FindViewByName until I find a match.
I suspect in most cases there will only be the dbo schema