This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @sql VARCHAR(255) | |
SET @sql = 'DBCC UPDATEUSAGE ("' + DB_NAME() + '")' | |
EXEC(@sql) | |
CREATE TABLE #Tables (tableName VARCHAR(255), tableRows INT) | |
INSERT #Tables | |
EXEC sp_msForEachTable | |
'SELECT PARSENAME(''?'', 1), | |
COUNT(*) FROM ?' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Our.Umbraco.Ditto; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Globalization; | |
using System.Reflection; | |
using Umbraco.Core.Models; | |
namespace Example.TypeConverters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create a temporary table for all documents which are published and not in the recycle bin | |
CREATE TABLE #Nodes (id int) | |
-- Delete all rows if the table exists before | |
TRUNCATE TABLE #Nodes | |
-- Insert all nodeIds from all documents which are published and not in the recycle bin | |
INSERT INTO #Nodes | |
SELECT N.id | |
FROM umbracoNode N | |
INNER JOIN cmsDocument D ON N.ID = D.NodeId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @dataTypeId AS INT | |
SET @dataTypeId = 0 -- DataTypeId to query on | |
SELECT DISTINCT(B.alias) | |
FROM cmsPropertyType A | |
INNER JOIN cmsContentType B ON A.contentTypeId = B.nodeId | |
WHERE A.dataTypeId = @dataTypeId | |
ORDER BY alias ASC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Name AS 'Text', | |
Alias AS 'Value' | |
FROM TeaCommerce_ShippingMethod | |
WHERE IsDeleted = 0 | |
ORDER BY Sort |