Syntax error

raphael99

Registered User.
Local time
Today, 13:24
Joined
Apr 6, 2015
Messages
126
Can someone take a look?
Code:
SELECT DISTINCT tblAnagrafica.[Cognome Nome], TabellaPIP.DescrizionePIP, tblAnagrafica.[Tessera Sanitaria], ConcatRelated("TabellaJoinPIP.DataPIP","TabellaJoinPIP", "queryPIPRecenti", [IDAnagrafica] = " & tblAnagrafica.ID & " AND [IDPIP] = "  & TabellaJoinPIP.IDPIP, "[DataPIP]") AS DatePIP
From tblAnagrafica INNER Join (QueryPIPRecenti INNER JOIN TabellaPIP ON QueryPIPRecenti.Codice PIP = TabellaPIP. Codice PIP) ON tblAnagrafica.ID = QueryPIPRecenti.[IDAnagrafica]
ORDER BY
TabellaPIP.IDPIP;

It gives me syntax error... Thanks
 
Not really.

Copy all this into the SQL view of the query designer and switch to design view. If it errors then build it up a bit at a time.

The query designer is a free syntax checker available to you at all times.
 
The problem is the below, so what is your intention:
Code:
ConcatRelated("TabellaJoinPIP.DataPIP","TabellaJoinPIP", "queryPIPRecenti", [IDAnagrafica] = " & tblAnagrafica.ID & " AND [IDPIP] = "  & TabellaJoinPIP.IDPIP, "[DataPIP]") AS DatePIP
 

Users who are viewing this thread

Back
Top Bottom