A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Not updatble query



 
 
Thread Tools Display Modes
  #1  
Old October 13th, 2006, 06:58 PM posted to microsoft.public.access.queries
Raul Sousa
external usenet poster
 
Posts: 58
Default 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  
Old October 13th, 2006, 09:06 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:34 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.