RE: [development-axapta] Query with ORDER BY and GROUP BY

2004-04-27 Thread Pieter Wijnen
My guess is that order by sum... is the culprit try using the alias instead HTH Pieter -Original Message-From: Don Price [mailto:[EMAIL PROTECTED]Sent: 22. april 2004 17:50To: [EMAIL PROTECTED]Subject: RE: [development-axapta] Query with ORDER BY and GROUP BY One

RE: [development-axapta] Query with ORDER BY and GROUP BY

2004-04-27 Thread Malcolm Burtt
Hi Werner I think what's wrong is that you've missed ItemId from the list of columns to select. In your standard SQL92 syntax you had the Qty, Amount and ItemId columns but you didn't include the ItemId in the Axapta translation. If you want to group by ItemId then ItemId needs to be

Re: [development-axapta] Query with ORDER BY and GROUP BY

2004-04-22 Thread Ing. Gonzalo Bastos S.
Hi Werner: The sintax of the first SQL Statement is good, a SQL Server Query, but in Axapta you can't use at where sintax likecustInvoiceTrans.InvoiceDate == str2date('20040107', 321), you only can use Table fields like Custtable.Accountnum = Custtrans.Accountnumby example. You can't

RE: [development-axapta] Query with ORDER BY and GROUP BY

2004-04-22 Thread Don Price
You can always go external right to sql using Connection con = new Connection(); Statement sqlStmt = Con.createStatement(); ResultSet sqlTable; Str sqlStr; sqlStr = your select statement sqlTable = sqlStmt.executeQuery(sqlSTR); while (sqlTable.next()){

RE: [development-axapta] Query with ORDER BY and GROUP BY

2004-04-22 Thread Don Price
One additional thing dont forget to set the company when going external, here is select statement I did on a memo field sqlSTR = strFmt(select recID from AAA_Tracker where notes like '\%%1\%' AND dataAreaId = '%2', Part2, datAreaId); you cant do that in Axapta either. Don