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

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -