• wow excellent catch David! I rarely work under multiple schemas, and certainly missed this!

    I've updated my code and previous links to have the correction you mentioned, and you can downloaded it here if needed:

    here is the updated version: sp_GetDDL2005_V307

    I've got a function that uses the same code, I'll need to fix that as well.

    Thanks David!

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!