Viewing 15 posts - 781 through 795 (of 7,191 total)
Yes - same issue. You're crossing two month boundaries: March/April and April/May. You probably need extra logic in your function to check whether the date part is less for the...
April 18, 2018 at 9:36 am
You haven't provided an example of a pair of dates for which the function doesn't work, so I'll guess what the problem is. The way DATEDIFF works is by counting...
April 18, 2018 at 9:17 am
I think you can run it on an evaluation licence for six months. After that, you have to either pay for it or stop using it. That was the case...
April 18, 2018 at 8:58 am
Yes, you need to back up the transaction log if your database is in Full recovery mode, and not just once a day. The full backup doesn't back up the...
April 18, 2018 at 7:43 am
April 18, 2018 at 5:33 am
April 18, 2018 at 5:27 am
This has got to be close. It looks right, although my result set has 180 rows whereas yours has 184.
WITH USandLocal AS (
SELECT
...
April 17, 2018 at 12:16 pm
Closer, but you've missed out the VALUES keyword and haven't put string values in quotes. It's a good idea to test code before posting it on a forum, if you...
April 17, 2018 at 9:04 am
I thought your query worked, except for the last column, which I fixed for you?
This query should work for your sample data and expected results. Note that...
April 17, 2018 at 1:15 am
Sounds very much like a homework question. What have you tried?
One approach would be to use a splitter function to split that part the string into its individual...
April 16, 2018 at 9:07 am
You can use a variable in the BACKUP statement for the database:DECLARE @DB sysname;
SET @DB = 'master';
BACKUP DATABASE @DB to DISK = 'NUL';
I...
April 16, 2018 at 7:02 am
Jason
13/04 is different from 12/04 and so on in that it can only be interpreted as dd/mm. The others were interpreted in your code as mm/dd, perhaps due...
April 13, 2018 at 3:59 am
You appear to be using SQL Server 2012. The WITH PARTITIONS syntax is only available in SQL Server 2016 and higher.
John
April 13, 2018 at 3:51 am
We're getting to the stage where we need some table DDL (CREATE TABLE statement(s)) and sample data (INSERT statements) if we're going to be able to provide any more help. ...
April 13, 2018 at 2:41 am
Viewing 15 posts - 781 through 795 (of 7,191 total)