Re: sql from access-pls analyze this error
Thank you Bob,
i am trying to analyze your sql advice
SELECT d.OrderID, d.DateSold, d.SalePrice, q.Referedby1, d.SalePrice*0.04 AS ReferredBy1Comm
FROM OrderDetails AS d
JOIN Query1 AS q ON OrderDetails.ContactAutoID = Query1.ContactAutoID
WHERE q.Referedby1 IS NOT NULL
AND q.Referedby1>0;
was actually very much confused since the query you corrected is derived from Query1 and it was working!
sql of Query1
SELECT Table1.ContactAutoID, Table1.Referedby AS Referedby1, Table1_1.Referedby AS Referedby2, Table1_2.Referedby AS Referedby3
FROM (Table1 LEFT JOIN Table1 AS Table1_1 ON Table1.Referedby = Table1_1.ContactAutoID) LEFT JOIN Table1 AS Table1_2 ON Table1_1.Referedby = Table1_2.ContactAutoID;
this was directly copied from access sql window to sql window of phpmyadmin
fortunatly i got a good output
of course as you mentioned, there is no [ ] in this...may be that's why it worked.
the angle of approach too seems different...
could you re-format Query1 too, though its working a comparative study will be a good learning experience.
thank you once again Bob
sunil
Subject
Views
Written By
Posted
2378
July 06, 2006 08:12AM
1472
July 06, 2006 09:10AM
Re: sql from access-pls analyze this error
1513
July 07, 2006 08:42AM
1529
July 07, 2006 09:25AM
1548
July 08, 2006 12:48AM
1432
July 08, 2006 07:28AM
1380
July 08, 2006 11:39PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.