Viewing 15 posts - 1,921 through 1,935 (of 7,614 total)
Actually, in ISO week, week# is controlled by Thursday being in the week. (Seriously, you can look it up.)
So, since this year happens to start on a Friday, ISO week...
February 5, 2021 at 4:08 pm
I think SQL Server loosened up on that. I believe you just need a unique index to create a FK against.
February 4, 2021 at 8:06 pm
It seems like you're doing a straightforward counting of 7 days as a week, regardless of the staring day of the week (SQL doesn't do that), then try this calc...
February 4, 2021 at 7:19 pm
Nope, not unless you do it yourself in some way.
February 4, 2021 at 7:05 pm
Hmm, yeah, I would think that would give you a lot of old customers, since there's no "recent sale date" requirement. Maybe you need something more along these lines...?
February 4, 2021 at 6:59 pm
Assuming "dates" could only be a number between 1 and 31...
DECLARE @UnitMembership TABLE
(
...
February 3, 2021 at 5:58 pm
As Jeff Moden as pointed out, for performance reasons, it's likely to best to create a physical tally table (if you don't already have one) to use for this query:
February 3, 2021 at 3:47 pm
I would think this would be the most straightforward way, although it may not be the most efficient way. But it might work just fine for you if...
February 3, 2021 at 3:09 pm
Actually the use of "parent" and "child" predates databases, for example with directories. Parent directory and child directory were very commonly used terms.
As to tables, not every referenced table is...
February 2, 2021 at 10:07 pm
I would think this would be the most straightforward way, although it may not be the most efficient way. But it might work just fine for you if your data...
February 2, 2021 at 3:56 pm
My personal opinion is that this has all the ear-markings of a classic invoice/invoice detail or work-order/work-order detail problem and should be handled as two individual tables rather than...
February 2, 2021 at 1:14 am
Or you could do this 😉
SELECT IDENTITY(int, 1, 1) AS id, A.*,B.*
INTO ##C
FROM A
JOIN B ON X = Y
February 1, 2021 at 8:01 pm
No, there's no direct way to do that.
However, you could use a standard identity column for the second part of the key, and use ROW_NUMBER() to get a sequential number...
February 1, 2021 at 2:20 am
Since you always want to list all recording artists, I'd start at that table. I would think it's possible that info on an album by a new artist might not...
February 1, 2021 at 12:53 am
A common approach to fix that issue in general is to isolate the SUM() in a separate query, so that the later join doesn't increase the total. For example, something...
February 1, 2021 at 12:28 am
Viewing 15 posts - 1,921 through 1,935 (of 7,614 total)