If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Not updatble query
Dear all
I have the fowling query statement, returning a non updatable query. I can not understand is it not updatable. SELECT FacturaVenda.NIF, FacturaVenda.DocID AS Factura, (nz([quantidade]*[preço]*(1+[iva]),0)-(nz([valor],0))) AS Divida, Recebimentos.Valor, Recebimentos.Recibo FROM (FacturaVenda LEFT JOIN Recebimentos ON FacturaVenda.DocID = Recebimentos.Factura) INNER JOIN VendaArtigos ON FacturaVenda.DocID = VendaArtigos.DocID WHERE (((Left([FacturaVenda].[DocID],2))="ft")) OR (((Left([FacturaVenda].[DocID],1))="N")); I most appreciate if some one could explain what is the problem whit it. |
#2
|
|||
|
|||
Not updatble query
It's the LEFT JOIN. It may be updateable if it's an inner join with one of
the fields being the table's primary key. Even if it was just a single table, you wouldn't be able to update the Divida field as it's a calculation. -- Jerry Whittle Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Raul Sousa" wrote: Dear all I have the fowling query statement, returning a non updatable query. I can not understand is it not updatable. SELECT FacturaVenda.NIF, FacturaVenda.DocID AS Factura, (nz([quantidade]*[preço]*(1+[iva]),0)-(nz([valor],0))) AS Divida, Recebimentos.Valor, Recebimentos.Recibo FROM (FacturaVenda LEFT JOIN Recebimentos ON FacturaVenda.DocID = Recebimentos.Factura) INNER JOIN VendaArtigos ON FacturaVenda.DocID = VendaArtigos.DocID WHERE (((Left([FacturaVenda].[DocID],2))="ft")) OR (((Left([FacturaVenda].[DocID],1))="N")); I most appreciate if some one could explain what is the problem whit it. |
Thread Tools | |
Display Modes | |
|
|