sql server - SSIS - Modify date column from the 15th to the 1st of the month -


select * [marktsk]  [monthlydt] not null --and --select dateadd(mm, datediff(mm,0,getdate()), 0) 

hello folks. know how correctly write statement display first of each month? have excel file importing server using ms ssis (visualstudio 2008). dates monthly, last few months 15th june, may, april etc. intent make of them show 1st of month. months before january 2015 have been on 1st of month.

the sql query above wrote in excel source editor.

thank you

this should give first of current month

select dateadd(month,datediff(month,0,getdate()),0) 

to pull first of month dates in table should it

select dateadd(month,datediff(month,0,[monthlydt]),0) [marktsk]  [monthlydt] not null 

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -