macromedia.coldfusion.advanced_techniques
[Top] [All Lists]

Re: Using 2 tables to edit db information

Subject: Re: Using 2 tables to edit db information
From: "Irish-Phoenix"
Date: Fri, 18 Jan 2008 01:45:46 +0000 UTC
Newsgroups: macromedia.coldfusion.advanced_techniques

I changed around the query and I get an error. Here is my query code:

 <cfquery name="proMan" datasource="#sitedatasource#" username="#siteUserID#" 
password="#sitePassword#">
        SELECT Projects.Name AS PName, Projects.CategoryID, Projects.ProjectID 
AS ID,
 Categories.Name AS CName, Categories.CategoryID
        FROM Project INNER JOIN Catergories ON projects.CategoryID = 
Categories.CategoryID
        ORDER BY Categories.Name
 </cfquery>

 This is my error:

 Error Executing Database Query.  
 [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft 
Access Driver] Syntax error in JOIN operation.  
   
 The error occurred in C:\Websites\x9vdzd\admin\project-manager.cfm: line 3
  
 1 : <cfset preappendURL = "../">
 2 : <cfset pageType = "admin">
 3 : <cfquery name="proMan" datasource="#sitedatasource#" 
username="#siteUserID#" password="#sitePassword#">
 4 :    SELECT Projects.Name AS PName, Projects.CategoryID, Projects.ProjectID 
AS 
ID,
 5 : Categories.Name AS CName, Categories.CategoryID

  

 
--------------------------------------------------------------------------------
  
 SQLSTATE   42000 
 SQL    SELECT Projects.Name AS PName, Projects.CategoryID, Projects.ProjectID 
AS ID, Categories.Name AS CName, Categories.CategoryID FROM Project INNER JOIN 
Catergories ON projects.CategoryID = Categories.CategoryID ORDER BY 
Categories.Name  
 VENDORERRORCODE   -3510 
  
 I am not good enough with joins yet to figure out where the error is. Can 
someone help me out? This is just to show the category in my code.

 Thank you.

 Phoenix


<Prev in Thread] Current Thread [Next in Thread>