April 16, 2019 at 12:00 am
Comments posted to this topic are about the item Create Table DDL via TSQL
Lowell
April 16, 2019 at 7:45 am
Hi, thanks for the good article.
But i tried downloading the compressed file, but it did not download.
Regards.
April 16, 2019 at 10:53 am
San_kan1gb;
I believe this article was reposted from the original~12 years ago, i'll see if i can recover the links. the proc has gone through a slew of changes since then..matching the created case of all objects, and a ton of improvements.
grab the code snippets form page 8 of this thread: it houses the most updated versions of this code.
https://www.sqlservercentral.com/forums/topic/get-ddl-for-any-sql-2005-table/page/8
there are things this code does not do, temporal tables , in memory optimized, partitioned tables, tables with custom data type names over 16 chars, and a few other exotics, like xml indexes.
let us know if you have any questions in that other thread.
Updated yet again...same old links but new code.
Lowell
April 16, 2019 at 2:49 pm
I've downloaded those files and added them to the article in a zip file.
September 15, 2022 at 4:44 pm
I have tried to change the line delimiter to '<br>' but the output is not changing.
Is this possible to achieve?
September 15, 2022 at 5:47 pm
you'll want to change the definition of @VbCrLf from VARCHAR(2) to something larger, and like this, maybe?
and make sure it is not being re-assigned to CHAR(13) + CHAR(10) later.
you'll end up needing to cleanup theoutput with html entities code for greater than and less than, as well, but it should work.
DECLARE @VbCrLf VARCHAR(10) ='<br />' + CHAR(13) + CHAR(10)
Lowell
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply