More wysiwyg

James Billings
James Billings Posts: 4 admin
Code snippets seem to get spamchecked :(

<div>/****** Object: &nbsp;StoredProcedure [dbo].[GetDynamicPagesForSitemap] &nbsp; &nbsp;Script Date: 07/04/2017 07:24:19 ******/</div><div>SET ANSI_NULLS ON</div><div>GO</div><div>SET QUOTED_IDENTIFIER ON</div><div>GO</div><div><br></div><div>-- =============================================</div><div>-- Author:		<Author,,Name></div><div>-- Create date: <Create Date,,></div><div>-- Description:	<Description,,></div><div>-- =============================================</div><div>ALTER PROCEDURE [dbo].[GetDynamicPagesForSitemap]</div><div>AS</div><div>BEGIN</div><div>	</div><div>SELECT c.ContentItemID, c.ShortTitle, t.TagText AS PrimaryTag,&nbsp;</div><div>	CASE&nbsp;</div><div>		WHEN art.ContentItemID IS NOT NULL THEN 'article'</div><div>		WHEN scr.ContentItemID IS NOT NULL THEN 'script'</div><div>		WHEN q.ContentItemID IS NOT NULL THEN 'question'</div><div>	END AS ContentType,</div><div>	c.LastModifiedDate</div><div>FROM dbo.ContentItems c</div><div>LEFT OUTER JOIN dbo.Tags t ON c.PrimaryTagID = t.TagID</div><div>LEFT OUTER JOIN dbo.Articles art ON c.ContentItemID = art.ContentItemID</div><div>LEFT OUTER JOIN dbo.Scripts scr ON c.ContentItemID = scr.ContentItemID</div><div>LEFT OUTER JOIN dbo.Questions q ON c.ContentItemID = q.ContentItemID</div><div>WHERE art.ContentItemID IS NOT NULL OR scr.ContentItemID IS NOT NULL OR q.ContentItemID IS NOT NULL</div><div><br></div><div>END</div>

Comments

  • James Billings
    James Billings Posts: 4 admin
    The above looks a bit wrong... line breaks all missing

    /****** Object:  StoredProcedure [dbo].[GetDynamicPagesForSitemap]    Script Date: 07/04/2017 07:24:19 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    -- =============================================
    -- Author:		<Author,,Name>
    -- Create date: <Create Date,,>
    -- Description:	<Description,,>
    -- =============================================
    ALTER PROCEDURE [dbo].[GetDynamicPagesForSitemap]
    AS
    BEGIN
    	
    SELECT c.ContentItemID, c.ShortTitle, t.TagText AS PrimaryTag, 
    	CASE 
    		WHEN art.ContentItemID IS NOT NULL THEN 'article'
    		WHEN scr.ContentItemID IS NOT NULL THEN 'script'
    		WHEN q.ContentItemID IS NOT NULL THEN 'question'
    	END AS ContentType,
    	c.LastModifiedDate
    FROM dbo.ContentItems c
    LEFT OUTER JOIN dbo.Tags t ON c.PrimaryTagID = t.TagID
    LEFT OUTER JOIN dbo.Articles art ON c.ContentItemID = art.ContentItemID
    LEFT OUTER JOIN dbo.Scripts scr ON c.ContentItemID = scr.ContentItemID
    LEFT OUTER JOIN dbo.Questions q ON c.ContentItemID = q.ContentItemID
    WHERE art.ContentItemID IS NOT NULL OR scr.ContentItemID IS NOT NULL OR q.ContentItemID IS NOT NULL
    
    END
    

  • System
    System Posts: 4 admin
    At least we have emojis :D
  • PeteH
    PeteH Posts: 2 admin
    yay emojis! ;);):\:/ let's see ho this looks in line
  • PeteH
    PeteH Posts: 2 admin
    Very happy with these 8-)B^D*|*<|>