Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with SQL and Inner Join

Status
Not open for further replies.

ben3486

Programmer
Mar 17, 2003
3
BE
Hi everybody

I'm trying to convert my Access DB to Mysql by using ASP and apparently, Mysql doesn't support Access SQL !!
This is my code I want to export:

SELECT franchise.ID, franchise.societe, franchise.nom, franchise.prenom, franchise.adresse, franchise.cp_ville, franchise.pays, franchise.telephone, franchise.fax, franchise.gsm, suivi_franchise.num_suivi, suivi_franchise.interlocuteur, suivi_franchise.date_suivi, suivi_franchise.suivi, suivi_franchise.remarques

FROM suivi_franchise INNER JOIN (franchise INNER JOIN rel_suivi_franchise ON franchise.ID = rel_suivi_franchise.num_franchise) ON suivi_franchise.num_suivi = rel_suivi_franchise.num_suivi

WHERE (((franchise.ID)=[numfranchise]));

is that someone can help me to resolve this problem??

Ben
 
SELECT franchise.ID,
franchise.societe,
franchise.nom,
franchise.prenom,
franchise.adresse,
franchise.cp_ville,
franchise.pays,
franchise.telephone,
franchise.fax,
franchise.gsm,
suivi_franchise.num_suivi,
suivi_franchise.interlocuteur,
suivi_franchise.date_suivi,
suivi_franchise.suivi,
suivi_franchise.remarques
FROM suivi_franchise INNER JOIN rel_suivi_franchise
ON suivi_franchise.num_suivi = rel_suivi_franchise.num_suivi
INNER JOIN franchise
ON franchise.ID = rel_suivi_franchise.num_franchise
WHERE franchise.ID = <numfranchise>

What is numfranchise?
 
Thanks for this quick answer !!

Actually, [numfranchise] is a criteria in Access. It gives you the possibility with ASP, to go directly to the appropriate record without reading the others (using command object)

Thank you again
ben
 
I tried this code inside a query but no records display however I deleted 'where ...'

On the other hand, I tried this code:

SELECT ... FROM franchise
Inner Join rel_suivi_franchise ON franchise.id = rel_suivi_franchise.num_franchise
Inner Join suivi_franchise ON suivi_franchise.num_suivi = rel_suivi_franchise.num_suivi

But only 3 records on 6 display on the screen !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top