Originariamente inviato da comas17
nella seconda riga metterei le parentesi quadrate su [Sap Product Code]
...INNER JOIN dbo.somma ON Vp.[Sap Product code]=somma.[Sap Product code]...
infatti, grazie!!
ora la query:
codice:
SELECT Vp.[Sap Product code], Vp.[Sale date], Vp.[Sale quantity UMB], SUM (Vp.[Sale quantity UMB]) FROM Vp INNER JOIN somma ON Vp.[Sap Product code]=somma.[Sap Product code] WHERE [Sap Product code] IN ('16662','16661','16663','16664','17189','17190','17191','17192','17802','17803','17804','17805') GROUP BY [Sap Product code], [Sale date], [Sale quantity UMB] HAVING ([Sale date] LIKE '= 102009%') ORDER BY [Sale date]
ma l'errore
codice:
Server: Msg 209, Level 16, State 1, Line 1 Ambiguous column name 'Sap product code'. Server: Msg 209, Level 16, State 1, Line 1 Ambiguous column name 'Sap product code'. Server: Msg 209, Level 16, State 1, Line 1 Ambiguous column name 'Sap product code'. Server: Msg 209, Level 16, State 1, Line 1 Ambiguous column name 'Sap product code'.