Viewing 2 posts - 1 through 3 (of 3 total)
--Restoring the full backup RESTORE DATABASE TestDB FROM DISK = 'E:\Backup\TestDBFull_1.bak' WITH NORECOVERY, REPLACE
--Restoring log backups RESTORE LOG TestDB...
February 22, 2017 at 1:00 am
#1929648
I always re-factor the CTE's when debugging them, for simplicity
;WITH CTE AS
(
SELECTID, Col1, Col2
FROMMyTable
WHERE...
)
SELECTCol1,
Col2
FROMCTE AS C
JOIN MyTable AS T
ON T.ID = C.ID
SELECTCol1
, Col2
FROM(
SELECTID, Col1, Col2 ...
April 19, 2016 at 12:21 am
#1872944