Viewing 15 posts - 1,666 through 1,680 (of 4,087 total)
August 2, 2017 at 2:26 pm
Here are two options: one using SUBSTRING, the other using STUFF. You may have to play around with the data lengths. You can also use strings instead of binary for...
August 2, 2017 at 2:17 pm
Since John Doe wants active and inactive cards, I've built on J Livingston SQL's reply:
July 31, 2017 at 8:22 am
This will happen if the ORDER BY clause in your OVER() clause is non-deterministic. That is, you have two or more rows that have the same value for the partition/order...
July 25, 2017 at 1:18 pm
July 25, 2017 at 12:59 pm
July 24, 2017 at 9:44 am
July 21, 2017 at 9:12 am
You were asked to supply the sample data as INSERT statements, not as a spreadsheet. Many people hesitate to open files from the Internet, because of the potential for harmful...
July 21, 2017 at 9:11 am
You've been around long enough to know how to post sample data and expected results. Also, one row isn't sufficient. Adding even one more row to the data creates an...
July 19, 2017 at 1:51 pm
This uses a windowed function with a frame of 5 rows (2 preceding and 2 following [plus the current row]) and evaluates to "true" (1) if any record in...
July 19, 2017 at 1:11 pm
You can fix this by changing the ORDER BY in your FIRST_VALUE calculation.
Your first order field should be whether there is a name or not, and then by the...
July 18, 2017 at 2:59 pm
SQL Server does not guarantee an order unless you specify an order. Which field(s) are you using to specify your order?
Drew
July 18, 2017 at 2:05 pm
Somebody needs to learn how to use synonyms (unless they're purposely trying to obfuscate things). I ran across a scalar-valued function in our client database and wanted to see exactly...
July 17, 2017 at 12:45 pm
Viewing 15 posts - 1,666 through 1,680 (of 4,087 total)