Hi Daniel,
First of all set the infos detail level to "All" in your user options
so you can see all infolog posted. In your message you're missing
useful SQL error explaintion that could help you.
In your second statement, replace de "order by" for "group by" and
that should resolve your problem.
Good luck.
--- In development-axapta%40yahoogroups.com">development-axapta
yahoogroups.com, "Daniel Zanni"
<danielzanni
...> wrote:
>
> Hello,
>
> I have a SQL statement like this
>
> while select localSalesParmTable
> join localCustSalesLegalTxt
> group by salesId, salesLegalTxtId
> where localSalesParmTable.SalesId ==
> localCustSalesLegalTxt.SalesId &&
> localSalesParmTable.ParmId == this.parmId()
>
> but I need the data usind order by with salesId exactly like this
>
> while select localSalesParmTable
> order by salesId
> join localCustSalesLegalTxt
> group by salesId, salesLegalTxtId
> where localSalesParmTable.SalesId ==
> localCustSalesLegalTxt.SalesId &&
> localSalesParmTable.ParmId == this.parmId()
>
> The Error happens and i get the following message
> "Error:Cannot select a record in Sales order - Update table
> (SalesParmTable). Sales order: , .
> The SQL database has issued an error."
>
> Somebody knows what happens in this case, because for me the
select
> statement is correct
>
> Regards
>
> Daniel
>
>
> [Non-text portions of this message have been removed]
>
.