And to add to Vern's reply I find the SQL Pocket Guide by Jonathan Gennick published by O'Reilly (ISBN: 0-596-52688-1) very handy. Especially if you find an example in one form (MS SQL or My SQL ) and want in in DB2 form.

This small book covers Oracle, DB2, MS SQL, MySQL and PostgreSQL (whatever that is) highlighting what is different. I've found it very handy when different versions call the same thing by different names.

Just my additional 2 1/2 Cents! Makes a good reference book at used ones are usually cheap on Amazon.
-- Jim

----------------------------------------------------------------------
Others have answered your question.

I have an idea, for better understanding of SQL - take the tutorial at w3schools.com - they have really excellent stuff, and this tutorial will _almost_ all apply to IBM i SQL, as well as almost any other RDBMS, such as MySQL or SQL Server or whatever.

Note the "almost" - there are functions in the tutorial that we don't have on IBM i - we have something that will get the same thing, usually
- examples are things like FIRST() and LAST().

There's also a nice menu for all kinds of things, including "SQL GROUP BY" - this is useful when looking for something specific.

The link is at http://www.w3schools.com/sql

I heartily recommend this or some other tutorial. There's everything in the SQL Reference for DB2 on IBM i, but it's not always easy to find one's way into it.

HTH
Vern

On 12/31/2013 9:03 AM, Hoteltravelfundotcom wrote:
Why does this group by not work, what is it I need to do?

Column NAME or expression in SELECT list not valid.
CREATE VIEW PROJ_CRWN1/DATA_WHSV2 AS SELECT CUSTOMER#, NAME, STATE,
ITEM#, PROD_LINE, INVOICE#, ORD_DATE, INV_DATE, ORD_TYPE, CUST_TYPE,
QUANTITY, EXTENDED$ FROM Proj_Crwn1.DTAWHS GROUP BY CUSTOMERr#





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.