Comments
Sort by recent activity
Sorry to say that I tried all three releases, and the problem still exists in all releases. In the end, I wrote my own version is Visual Studio - took me 4 hours and worked like a charm. If you ever get your software fixed, please let me know.
Sorry if this sounds negative, but with 17 databases to move, over 3 runs, I would have been mapping fields and tables for the rest of my life. / comments
Sorry to say that I tried all three releases, and the problem still exists in all releases. In the end, I wrote my own version is Visual Studio - took me 4 hours and worked like a charm. If you ...
Hi (again),
i have a script which does a rough version of what I am talking about - I can get just the comments - it woul just be nice if the header comments were in the same document as the SQL DOC generated stuff - parameters, called by, calls, etc.
The SPROC to display just the headers is as follows:
-- Drop temporary tables if they exist
IF OBJECT_ID('tempdb..#temp') IS NOT NULL
BEGIN
DROP TABLE #temp;
END
DECLARE @proc VARCHAR(100), @schema VARCHAR(100), @proc_id INTEGER, @schema_proc VARCHAR(200);
-- Cursor to work through our procs
DECLARE procCursor CURSOR LOCAL FAST_FORWARD FOR SELECT p.[name] AS [proc],
s.[name] AS [schema]
FROM sys.procedures p
INNER JOIN sys.schemas s
ON s.schema_id = p.schema_id;
OPEN procCursor;
FETCH NEXT FROM procCursor INTO @proc, @schema; @FETCH_STATUS = 0)
BEGIN
SET @proc_id = SCOPE_IDENTITY();
-- Create a temp table to hold comments
CREATE TABLE #temp
(
[Text] VARCHAR(4000) NULL
);
-- Build schema + proc string
SET @schema_proc = @schema + '.' + @proc;
-- sp_helptext to get proc definition
-- and insert into a temp table
INSERT INTO #temp
EXEC sys.sp_helptext @schema_proc;
-- Just an id we'll use later to identify rows
ALTER TABLE #temp ADD Id INTEGER NOT NULL IDENTITY(1,1) PRIMARY KEY CLUSTERED;
-- Display Proc Name
select @proc as [text],'0' as Id
union
SELECT replace(replace(replace([text],'*',' '),'-',' '),'/',' '),Id FROM #temp where Id < (select Id from #temp where [Text] like 'CREATE PROCEDURE%') and LTRIM(RTRIM(replace(replace(replace([Text],char(9),''),char(10),''),char(13),''))) <> '';
-- Drop the temp table
DROP TABLE #temp;
-- Get the next row
FETCH NEXT FROM procCursor INTO @proc, @schema;
END
-- Clean up
CLOSE procCursor;
DEALLOCATE procCursor; / comments
Hi (again),
i have a script which does a rough version of what I am talking about - I can get just the comments - it woul just be nice if the header comments were in the same document as the SQL DO...