Viewing 15 posts - 751 through 765 (of 3,480 total)
How can you get a non whole number answer if everything starts and ends on the hour? Because each room is effectively for two meetings at once?
March 23, 2020 at 3:35 pm
Andy,
I created the table and added the insert scripts... (although the table really needs indexing!)
If you really need help, help us help you. Read this link: How to post code...
March 23, 2020 at 6:00 am
Like this?
SELECT dbname
, [type]
, CAST( ((SUM(Size)* 8) / 1024.0) AS DECIMAL(18,2) ) AS SizeMB
FROM
(SELECT DB_NAME(database_id) as dbname,
[Type] = CASE WHEN Type_Desc = 'ROWS' THEN 'Data File(s)'
WHEN Type_Desc =...
March 22, 2020 at 8:09 pm
StopType is either (P)ick or (D)rop
(That's why I was doing the CASE WHEN StopType = 'D' THEN -1 ELSE 1 END part... to convert those pickups to positive numbers and...
March 22, 2020 at 3:04 am
So you just want a total number of passengers picked up during the whole route - doesn't matter when they get on or off? then you'd just count the PassengerIDs...
March 22, 2020 at 2:25 am
It's the "who's the conductor of the train?" joke, but you really want the number of passengers on the train at any point.
I wouldn't count the bit column, personally. I'd...
March 22, 2020 at 2:13 am
I guess I answered this question, the one you explicitly asked instead of the one you intended:
I'm trying to get a running total of how many riders are on the...
March 22, 2020 at 12:33 am
Not a clue what Modulo has to do with this. Sounds like you want a running total of riders boarding minus a running total of riders leaving the bus. Maybe...
March 22, 2020 at 12:04 am
Post your SQL statements here... nobody's going to download files from people they don't know.
March 21, 2020 at 8:13 pm
How about doing something like BCP OUT to write the records to some manageable number of text files, and then use BULK INSERT to insert each file of, say, 100K...
March 21, 2020 at 1:53 am
Couldn't you use TOP with OFFSET to get a fixed size chunk of records and insert that way? (So modify to do the insert in chunks?
use AdventureWorks2017;
GO
DECLARE...
March 21, 2020 at 12:27 am
Jo,
It was in a painfully obvious place. Right-click on the gray area (not on the report), and select "Report Properties" from the context menu. It's under there.
So then you can...
March 20, 2020 at 4:15 pm
Oh, they hid the variable declaration stuff... I should have known. Good to know it's there...
March 20, 2020 at 5:05 am
Why not schedule a job and have it run in the middle of the night when nobody's using the database?
March 20, 2020 at 1:48 am
You can run R code from within SQL Server (Python too, now).
March 14, 2020 at 9:04 am
Viewing 15 posts - 751 through 765 (of 3,480 total)