Viewing 15 posts - 7,321 through 7,335 (of 59,102 total)
To answer the question "can a Cust_num have more that one Co_num or not?" yes, in our case customers can have multiple Co_num , so need to figure a...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 12, 2020 at 12:08 am
Shifting gears a bit, it sounds to me like the SSNs in these 45 tables are in clear text. If that's true, please inform management that's freakin' insanely stupid and...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 8:16 pm
Hi Williams,
Thanks for making your time for reply!!
why do you need a copy of the data in the secondary database?
My reply:-Actually my task was to update the data across...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 8:09 pm
Bloody amazing machines nowadays. The laptop I'm currently using has the following specs...
Processor Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2208 Mhz, 6 Core(s), 12 Logical Processor(s) (w/automatic Overclock up to...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 7:47 pm
Post deleted. It's no longer needed.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 6:19 pm
Great article. Just don't settle on a single mentor because no one person knows it all. Have many and include yourself in that. It's amazing what you can string together...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 5:24 pm
In both solutions - I would move the calculation to a CROSS APPLY:
SELECT Cust_num
,Co_num
...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 5:03 pm
Very very nice pre-aggregation! Now thaaaat's the way to do it.
It's not just me... we did it together. You reminded me not only of the IIF function but also...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 5:00 pm
>> A better idea is to use the correct datatype. ,<<
I agree with that statement. In fact read his posted this in a wonderful single principal, for which a...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 4:52 pm
select
Cust_num, Co_num,
sum(amount) Total,
sum(iif(floor(datediff(d,due_date,getdate())/30)=0,amount,0)) [1-30 Days],
sum(iif(floor(datediff(d,due_date,getdate())/30)=1,amount,0)) [31-60 Days],
sum(iif(floor(datediff(d,due_date,getdate())/30)=2,amount,0)) [61-90 Days],
sum(iif(floor(datediff(d,due_date,getdate())/30)>2,amount,0)) [>90 Days]
from EES_App.dbo.artran_all
group by Cust_num,...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2020 at 3:45 pm
Post deleted...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2020 at 10:09 pm
Since you attempt at code and what you posted as your desired final output have several difference between the two, I split the difference and can derived the following code. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2020 at 8:57 pm
A better idea is to use the correct datatype. If the column is supposed to only handle digits, then changing the datatype of the column to be an INTEGER would...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2020 at 6:45 pm
I need help with a query. If I have a list of people each with a service date and I want to sum their spend one year and two...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2020 at 6:33 pm
Recreating such a thing in yet another "string format" would go against my grain. Why not convert it to a proper DATE or DATETIME datatype?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 10, 2020 at 4:11 pm
Viewing 15 posts - 7,321 through 7,335 (of 59,102 total)