Hi,
I have an access database with three tables. I made one query using two other queries from the same database to form the select I need. But now I don't know how to convert it in select which would work in my C# windows form as well. I use this select to fill the dataset for making the crystal report later.
Here is the select I have in access query:
SELECT firstquery.GBR, firstquery.Gorivo, secondquery.SUMKM, ((firstquery.Gorivo/secondquery.SUMKM)*100) AS Prospotrgor, firstquery.Addblue, firstquery.Addbluegor, firstquery.Antifriz, firstquery.Motmaslo, secondquery.pockm, secondquery.krajkm, secondquery.RAZLIKA, secondquery.Poslprov, secondquery.Poslserv, secondquery.Zabeleska
FROM firstquery LEFT JOIN secondquery ON firstquery.GBR = secondquery.GBRV;
firstquery is the name of the first query with the first select statement, and secondquery of the second query respectively.
Could anybody help me please?
Thank you in advance

Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 30, 2011, 5:33 PM EST
Try this...
SELECT firstquery.GBR, firstquery.Gorivo, secondquery.SUMKM, ((firstquery.Gorivo/secondquery.SUMKM)*100) AS Prospotrgor, firstquery.Addblue, firstquery.Addbluegor, firstquery.Antifriz, firstquery.Motmaslo, secondquery.pockm, secondquery.krajkm, secondquery.RAZLIKA, secondquery.Poslprov, secondquery.Poslserv, secondquery.Zabeleska
FROM firstquery , secondquery where firstquery.GBR = secondquery.GBR;
Thanks
NelRank #2,060 · 702 reputationPosted Nov 30, 2011, 8:36 PM EST