Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Calendar Tables

    Is there an error in the last code section of your article?

    snippit:

    -- This returns the first day of the current month.

    SET @StartYear2 = DATEADD(YY, -1, DATEADD(MM, DATEDIFF(MM, 0, GETDATE()), 0));

    --...

  • RE: INFORMATION_SCHEMA.101

    How about using the "undocumented" sp_MSforeachdb.

    -- Finding Tables

    EXEC sp_MSforeachdb 'USE [?]

    Select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE

    From INFORMATION_SCHEMA.TABLES

    Where TABLE_NAME like ''%Address%''

    AND TABLE_CATALOG NOT IN (''Master'', ''model'', ''msdb'', ''tempdb'',...

Viewing 2 posts - 1 through 2 (of 2 total)