Sql query to run on 1st and 2nd sunday of every month

Hi All,

Can i know the sql query to run on 1st and 2nd sunday of every month

One way, is using SQL Server Agent

Hi ,

Thanks for your response and can i know the Query for get in a calendar month for 1st and 2nd sunday

select cast(dateadd(day,n,dateadd(month,datediff(month,0,current_timestamp),0)) as date)
  from (values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13)) as cte(n)
 where datediff(day,0,dateadd(day,n,dateadd(month,datediff(month,0,current_timestamp),0)))%7=6