Viewing 15 posts - 571 through 585 (of 3,480 total)
I'll give it a try... did an initial search for "stored procedure" + db2, and came up empty.... so I searched for just "DB2"... also empty. =(
Maybe IBM doesn't like...
December 10, 2020 at 8:50 pm
What if you just create a new query (like CTRL-N) and then CTRL-Shift-Q to design in query designer... then just join the tables that way?
You don't mean that all 13...
December 8, 2020 at 3:36 am
Read up on windowing functions. This:
,rsPaid = SUM(Paid) OVER (ORDER BY FixedDateROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
does a running sum.
December 4, 2020 at 4:22 pm
like this? Really I should learn how to convert normal dates to silly US date format (or vice versa), but anyway... this should work... (create running totals for Invoiced and...
December 3, 2020 at 9:19 pm
The link David Edwards provided works. Now to import and play.
Thanks!
December 3, 2020 at 3:43 am
Not sure... something like this?
SELECT YEAR(t.Date) AS yr
, MONTH(t.Date) AS mo
, d.Site
, d.Dept
, d.Cat
, SUM(d.Num) AS Total
FROM #date_dim t
LEFT JOIN #Data d
ON t.Date = d.Date
GROUP BY...
December 2, 2020 at 11:34 pm
Please explain why you are shrinking your database. About the only time you need to shrink your database is when something happens in it to cause file size bloat that...
December 2, 2020 at 5:21 pm
The error "Operand type clash: text is incompatible with datetime2" sounds like the date columns in Oracle are being interpreted as text, so you might have to use an expression...
November 30, 2020 at 9:10 pm
For a minute there, I thought I worked for the boss Thomas describes in scenario #1. My boss used to tell me "Document, document, document!" And he was the only...
November 29, 2020 at 11:09 pm
Most folks here won't touch an Excel file. Make life easy on everyone and post the setup script for your question... something like this:
use tempdb;
go
CREATE TABLE SalesTable...
November 22, 2020 at 5:20 am
Did someone restore a bunch of databases recently? Sounds like someone replaced the reports database with an old version, because it would cause your SSRS instance to suddenly look like...
November 19, 2020 at 9:43 pm
Why do you feel you need views of all the tables? Are you trying to return a fixed subset of the rows in the table? If it's for reporting, then...
November 19, 2020 at 5:47 pm
You have to split the values first, so you have a normalized structure so you can do the aggregation. I used Jeff Moden's DelimitedSplit8K function
SELECT Lang2,...
November 12, 2020 at 5:48 pm
Looking at the 4394 records which have some value for SupplierID in PharmInventoryIn I've seen up to 5 trades back and forth between us and different distributors. And that's not...
November 4, 2020 at 10:39 pm
NTILE(n) will divide the set into n nearly evenly sized chunks. Not sure how you would force full groups into a single "chunk" though
October 26, 2020 at 7:29 pm
Viewing 15 posts - 571 through 585 (of 3,480 total)