Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-06-05 : 21:35:47
|
J.C.Klitgaard writes "I have two tables
1. ArticelHeads(tablename) containing the following fields: artID (autonumber) artHead (char) -
2. ArticelTxt(tablename) containing the following fields: txtID (autonumber) txtHead (char) txtDesc (text) txtTime (datetime) artID (int) - refering to the artID-number in the first table
I try ty make this query: strSQL="SELECT ArticelHeads.ArtName, Count(ArticelTxt.ArtID) AS articelCount, MAX(ArticelTxt.txtTime) AS LastTime"
strSQL=strSQL+" FROM ArticelHeads LEFT JOIN ArticelTxt ON ArticelHeads.ArtID = ArticelTxt.ArtID "
strSQL=strSQL+" GROUP BY ArticelTxt.ArtID"
It is working fine in MySQL -
I get two records showing me an articlename, a correct time, and a perfect count.!!
but! when I try it in (on?) my asp-page, the record-end of-file is true....
If I just remove the "count( ...." statement I get the result that I want. If I make a count in one table, it works fine. Am I doing somthing wrong, or What am I doing wrong
(and sorry about my english, it's not my best)" |
|
|
|
|
|