ChainsawJoe
Programmer
The following SQL query run perfectly in SQL 2K and even in Access (I tried creting it in access to get the bracketing that both Access and CR use, in case that was the issue) - I've even removed the left joins to see if that was the problem, but here's what happens;
returns incorrect data via Crystal Report - but ONLY when viewed via a C# .NET page.. within CR, it's fine. in a .NET webform page the results are very strange - rows are returned that I can't make appear via query analyser no mater how I screw around with the SQL. it's not the "left joins" that are being missed (as I thought it might be) and it's not the "where" clause being ignored either.
I'm relly getting annoyed with this now - can anyone help please?!
--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
Code:
SELECT
Pages."Title",
Pages."Abstract",
Pages."UpdatedDate",
KnowledgeBaseItem."CreatedDate",
KnowledgeBaseItem."Hits",
Person."Forename",
Person."Surname",
KnowledgeBaseGroupSubtype."Name"
FROM
((PageWebs INNER JOIN ((Pages INNER JOIN KnowledgeBaseItem ON Pages.Page_PKID = KnowledgeBaseItem.Page_FKID) INNER JOIN Person ON Pages.Person_FKID = Person.Person_PKID) ON PageWebs.Page_FKID = Pages.Page_PKID) LEFT outer JOIN KnowledgeBaseItemSelectedSubtypes ON KnowledgeBaseItem.Item_PKID = KnowledgeBaseItemSelectedSubtypes.Item_FKID) LEFT outer JOIN KnowledgeBaseGroupSubtype ON KnowledgeBaseItemSelectedSubtypes.Subtype_FKID = KnowledgeBaseGroupSubtype.Subtype_PKID
WHERE
(((KnowledgeBaseItem.EndDate)>getdate() Or (KnowledgeBaseItem.EndDate) Is Null))
I'm relly getting annoyed with this now - can anyone help please?!
--------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------