Added a new MyGeneration template archive that contains a template that generates views from your tables (SQL Server) - Generate SQL Server Views .
Returns NULL's if blank string and column allows NULL's. Also breaks down dates into component parts (i.e. Month, Day, Year) and to other formats:
Short Date (mon dd yyyy)
Short Time (hh:mm)
US Date (mm/dd/yyyy)
ANSII Date (yyyy.mm.dd)
UK Date (dd/mm/yyyy)
German Date (dd.mm.yyyy)
Italian Date (dd-mm-yyyy)
Example Output:
USE [news]
GO
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_NAME = 'vw_News')
DROP VIEW vw_News
GO
CREATE VIEW [vw_News]
AS
SELECT
[ID] AS [NewsID],
NULLIF ([Title], '') AS [News Title],
NULLIF ([Url], '') AS [News Url],
[Added] AS [Date Added],
CONVERT ( char(11) , [Added] , 113) AS [Date Added_ShortDate],
CONVERT ( char(5) , [Added] , 108) AS [Date Added_ShortTime],
CONVERT ( char(10) , [Added] , ...