simmerdown
Programmer
I'm not sure if this problem is originating from my Access database or the ColdFusion app, but here's what's going on.<br><br>Within the database I have a table named "Departments" which contains two columns, "ChemID" and "DeptName". The two columns together make up a compound key for that table, since there can be duplicates in either ChemID or Departments (but never both in the same row).<br><br>My query is:<br><br><FONT FACE=monospace><cfquery datasource="rtk" name="id"><br>SELECT ChemID<br>FROM Departments <br> WHERE DeptName = '#URL.dept#'<br></cfquery></font><br><br>The DeptName value gets passed in the URL from the previous page, of course.<br><br>My recurring problem is that <b>the query only returns the first record</b> that matches my DeptName. There should be multiple rows selected.<br>I've tried several variations on that query with no success, and queries elsewhere with an identical structure work just fine. Am I lacking something in my SQL, or should I go back to the database? I'm beginning to think it's the database at the root of the problem.<br><br>Any help is much appreciated.