List Info

Thread: Error in Sql Statement




Error in Sql Statement
country flaguser name
United States
2007-06-04 09:51:07

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]

__._,_.___
.

__,_._,___
Re: Error in Sql Statement
country flaguser name
United States
2007-06-06 14:19:10

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-axaptayahoogroups.com, "Daniel Zanni";
<danielzanni...> wrote:
&gt;
> Hello,
&gt;
> 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
&gt; (SalesParmTable). Sales order: , .
> The SQL database has issued an error.&quot;
>
> Somebody knows what happens in this case, because for me the
select
> statement is correct
>
> Regards
>
> Daniel
&gt;
>
> [Non-text portions of this message have been removed]
>

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )