• leaders_j (10/20/2010)


    Thanks, the code works but it truncates the result of must of my tables. Is there anything you can do?

    since SQL 2000 is limited to varchar(8000), and you may have table definitions that are longer than that, what with the formatting that proc uses, you are limited if you have to have it in a single string. That version will give truncated results for long definitions.

    if a multi row results are ok, you can try this version, which returns a table...basically each column as it's own row:

    Get DDL for Any SQL 2000 Table Version 3

    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!