× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



CTEs are part of the select statement and can be used in an INSERT statement with a SELECT.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them and keeping them!"
„Train people well enough so they can leave, treat them well enough so they don't want to.“ (Richard Branson)


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> On Behalf Of Jeff Crosby
Sent: Freitag, 13. April 2018 17:58
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Need an SQL joining lesson

Forgot to add Charles, I ultimately need to turn it into an insert statement.

On Fri, Apr 13, 2018 at 11:57 AM, Jeff Crosby <jlcrosby@xxxxxxxxxxxxxxxx>
wrote:

Charles
Did you see my other posts?

With the CTE? Yea. Trying to avoid that. If it's that complex I may
not go the SQL route at all. When I look at it a year from now I
won't remember . . .

My issue is my job is more corporate management, by far, than tech stuff.
Don't get enough immersion in it.


On Fri, Apr 13, 2018 at 11:32 AM, Charles Wilt
<charles.wilt@xxxxxxxxx>
wrote:

On Fri, Apr 13, 2018 at 7:51 AM, Jeff Crosby
<jlcrosby@xxxxxxxxxxxxxxxx>
wrote:

I get these results:

Cust YYYYMM Category Sales Credits
==== ====== ======== ======= =======
1892 201802 E 6967.72 8400.20
1892 201802 F 3540.22 5097.12
4554 201802 B 3556.01 3406.56
4554 201802 D 1004.97 163.76
4554 201802 E 5706.34 6344.00
(Total) 20775.26 23411.64

I note a few things:

1) more credit than sales, never a good thing from a business
standpoint
:)

2) numbers obviously not right

3) if there are sales and no credits, no record appears and I
assume the reverse would be true


​As expected, the fan out is the problem...

Did you see my other posts?

Charles​
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L)
mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our
affiliate
link: http://amzn.to/2dEadiD




--


Jeff Crosby
VP Information Systems
UniPro FoodService/Dilgard
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531
direct.dilgardfoods.com

The opinions expressed are my own and not necessarily the opinion of
my company. Unless I say so.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.