SELECT DATEADD(month, DATEDIFF(month, 0, @mydate), 0) AS StartOfMonth
More Related Contents:
- I dont know sql syntax for my table [closed]
- Is it possible to write single query on two table which are not connected to each other?
- CROSS JOIN vs INNER JOIN in SQL
- Can I Comma Delimit Multiple Rows Into One Column? [duplicate]
- SQL query to select dates between two dates
- SET versus SELECT when assigning variables?
- Multiple INSERT statements vs. single INSERT with multiple VALUES
- Split function equivalent in T-SQL?
- Generate Dates between date ranges
- Is having an ‘OR’ in an INNER JOIN condition a bad idea?
- How to print VARCHAR(MAX) using Print Statement?
- Where value in column containing comma delimited values
- How to update Identity Column in SQL Server?
- SQL query to split column data into rows
- Common Table Expression, why semicolon?
- T-SQL split string based on delimiter
- Bulk DELETE on SQL Server 2008 (Is there anything like Bulk Copy (bcp) for delete data?)
- Concatenate values based on ID
- Splitting delimited values in a SQL column into multiple rows
- SQL “between” not inclusive
- Can I set ignore_dup_key on for a primary key?
- Using PIVOT in SQL Server 2008
- Stored procedure that exports data into csv files only exports to one file
- How do I prevent a database trigger from recursing?
- TSQL – How to use GO inside of a BEGIN .. END block?
- How to combine results of two queries into a single dataset
- When using GETDATE() in many places, is it better to use a variable?
- Executing SQL Server Agent Job from a stored procedure and returning job result
- SQL take just the numeric values from a varchar
- Cumulative Total in MS Sql server [duplicate]