Viewing 15 posts - 2,416 through 2,430 (of 59,067 total)
Jeff's code seems to generate primary keys and produces the correct output afaik. Creating foreign keys should be straightforward for the OP. The split could be accomplished with OPENJSON...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 7:09 pm
Getting back on track, I agree with the simple definition expressed at the top of the article in the following link...
https://www.reference.com/world-view/partial-dependency-91beb2fa8c8354c5
That also means that the previous partial list of dependencies...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 6:58 pm
It's funny how such articles never use the word "partial".
Dependecies:
1. Grown children , working spouses, other relatives, and some "friends".
2. Old people with occasional bladder control issues. It's part of...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 6:51 pm
Although JSON is a simple solution, I generally avoid it for single level JSON because it's a fair bit slower than DelimitedSplit8k, Eirikur's wonderful "Lead" addition to the DelimitedSplit8k function,...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 6:04 pm
Interesting that you've had the same problem with posts automatically being replicated, Grant. You should report that on the "Site Issues" forum and then send Webmaster@SQLServerCentral.com a heads-up. You're not...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 5:52 pm
Well done and very much appreciated, Ron. Thank you for taking the time to "splain the gazintas" for me.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 5:33 pm
@sks_989 ,
You're using SQL Server 2017. It has a nice little goodie known as TRIM() that will easily replace the need for multiple REPLACES.
Also, get in the habit of leaving...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 8:51 am
An outer join to some form of a calendar table or sequence generator along with a count of days vs students appearing in the table should do the trick.
If you...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 22, 2022 at 7:20 am
I'm not sure that counts as a TVC in an INSERT. The TVC is in the SELECT statement.
I also don't know how to word this without just giving away...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 21, 2022 at 10:44 pm
@RonKyle...
Apologies for the off-topic question but...
Since you're a Guru that's been working with DWs and actually teach it, I'm just curious as someone who doesn't work with DW's and am,...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 21, 2022 at 10:38 pm
I made idCategoria only on table categoria, I was gonna make an Alter Table on usuario for creating the foreign key, it means then that I need to create...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 21, 2022 at 10:22 pm
SELECT DATEADD(SECOND, -sample_ms/1000, GETDATE()), * FROM sys.dm_io_virtual_file_stats ( 1,1)
or
SELECT DATEADD(mi, -sample_ms/1000000, GETDATE()), * FROM sys.dm_io_virtual_file_stats ( 1,1)
Heh... instead of picking through the manure trying to figure out what the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 21, 2022 at 9:46 pm
The correct answer is... none of the above because because the method is unreliable. After 25 days, 20 hours, 31 minutes, and 23.649 seconds (-2147483649 ms), the DATEADD() will fail...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 21, 2022 at 5:04 am
To be honest, I don't use either SSRS or SSIS for such things. I'll generally create a stored procedure to execute and create a "refreshable" spreadsheet that will run the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2022 at 5:29 pm
This is a mostly SQL Server WebSite. You might not get an answer for PostgreSQL here. You might.
The following search seems to have some example of what you're trying to...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2022 at 5:15 pm
Viewing 15 posts - 2,416 through 2,430 (of 59,067 total)