Viewing 15 posts - 511 through 525 (of 4,087 total)
Check out the following articles by Itzik Ben-Gan:
Packing Intervals which discusses how to ignore gaps up to a certain length and
June 17, 2019 at 6:54 pm
To avoid the "0" and negative problem, change it from using the sequence number to using the event record ID. In the example you have above, it looks like...
June 17, 2019 at 2:10 pm
The best way? Normalize your data instead of trying to store it denormalized.
Drew
June 13, 2019 at 5:50 pm
The problem here is that you are using an INNER JOIN when you should be using an OUTER JOIN and in trying to emulate an OUTER JOIN, you are creating...
June 10, 2019 at 2:36 pm
Shifting gears for a minute... does anyone have experience with BitBucket (source control) and Jira? Rumor has it that they integrate seamlessly but have zero experience with either so...
June 4, 2019 at 6:19 pm
It's all in the documentation.
-- Syntax for SQL Server and Azure SQL Database
[ WITH <common_table_expression> [ ,...n ] ]
DELETE...
June 4, 2019 at 6:02 pm
It requires two steps.
CAST(xmldata.value('(ns8:date)[1]', 'DATETIMEOFFSET') AS DATETIME) RDate
Drew
May 31, 2019 at 9:09 pm
Since you are on SQL 2017, you can use LEAD()
or LAG()
.
SELECT *, CASE WHEN EffectiveFromDate < LAG(EffectiveToDate) OVER(PARTITION BY RentType ORDER BY EffectiveFromDate, EffectiveToDate) THEN 1...
May 31, 2019 at 9:01 pm
There was a syntax error in your code, so it wouldn't run. I had to guess at what you wanted.
May 30, 2019 at 9:14 pm
Thanks for the reply, but I can not do that. I am taking a time like 10:02:00 and looping through the table above and checking this for each row;...
May 30, 2019 at 5:23 pm
The closest that I've seen is to use the OPENXML
command specifying a table name (Example E).
May 29, 2019 at 9:53 pm
This is something that is usually best left to the presentation layer. You can do it in SQL, but it is much easier in SQL 2012. Are you really still...
May 28, 2019 at 9:35 pm
The sample data is the one that I have posted. And the DDL is not actually implies student ID. I had a requirement from my manager asking for same...
May 28, 2019 at 9:30 pm
A PIVOT
can only work on one source column, but your data is coming from two columns. This is why the CROSS TAB approach is usually better. There's a similar...
May 23, 2019 at 7:01 pm
WHERE
clause.May 23, 2019 at 6:54 pm
Viewing 15 posts - 511 through 525 (of 4,087 total)