iscomar001
6/24/2015 - 9:39 PM

WITH tables

WITH tables

--Create 3 tables
WITH hoy(num,fecha) as (
	SELECT 1, GETDATE()
),tomorrow(num,fecha) as (
	SELECT 1 ,GETDATE()
),tree(num,fecha) as (
	SELECT 1 ,GETDATE()
)
SELECT *
FROM hoy h INNER JOIN tomorrow t
	on h.num = t.num INNER JOIN tree e
	on e.num = t.num