DOS command to concatenate files

for /F %f in (list.txt) do (echo %f >> newfile.txt & type %f >> newfile.txt & echo. >> newfile.txt)

Advertisements

Determine the Fiscal Quarter by Calendar Date

SELECT DATEPART(QUARTER, DATEADD(MONTH, -FiscalYearEndingMonth, CalendarDate))

If the fiscal year end is September, the fiscal quarter of today is the following.

SELECT DATEPART(QUARTER, DATEADD(MONTH, -9, GETDATE()))