Viewing 15 posts - 2,446 through 2,460 (of 59,086 total)
@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
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 20, 2022 at 5:06 pm
@Raja mssql ,
Nothing like giving would-be hackers an advantage. I strongly recommend that you modify your original post to NOT include your IP addresses even though it's an older post.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2022 at 4:59 pm
Taking a SWAG at what's desired, here's the "vertical" rendition using the given data. I don't recommend Pivoting such data anywhere but a spreadsheet and I wouldn't do it there,...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2022 at 2:45 am
I have a table named Books and a table named Transfer with the following structure:
CREATE TABLE Books
(
BookID int,
Title varchar(150),
PurchaseDate date,
Bookstore varchar(150),
City varchar(150)
);
INSERT INTO Books VALUES (1, 'Cujo', '2022-02-01', 'CentralPark1', 'New...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2022 at 1:52 am
Ok... when you have a ModelNameID like this...
000.001.002.000.0
... or like this...
000.160.170.000.0
... what do you want to return?
My thought is that it's a form of future computational suicide to drop the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 20, 2022 at 12:52 am
I would like to pull the 1 and 46 from the 000.001.070.000.0 to return as 1.46 .
I'm totally lost here... where do you see a "46" in the "000.001.070.000.0"...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 19, 2022 at 11:51 pm
Viewing 15 posts - 2,446 through 2,460 (of 59,086 total)