Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
b13 Derived table names |
Sun, May 9 2010 8:32 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | I wanted to test ot the effect of an ORDER BY clause so using EDBManager I ran the query
SELECT _PNO, COALESCE(_Result,'-') AS _Result, COALESCE(_Analysis,'-') AS _Analysis, COUNT(*) AS _Count, CAST(100* COUNT(*) / X._Total AS NUMERIC(0,1)) AS _Percentage FROM CallStats JOIN ( SELECT _Result, COUNT(*) AS _Total FROM CallStats WHERE _fkProjects = :ProjectID AND _Date BETWEEN :StartDate AND :EndDate GROUP BY _PNO,COALESCE(_Result,'-') ) X ON COALESCE(X._Result,'-') = COALESCE(_Result,'-') WHERE _fkProjects = :ProjectID AND _Date BETWEEN :StartDate AND :EndDate GROUP BY _PNO,COALESCE(_Result,'-'),COALESCE(_Analysis,'-') Leaving that one I opened another query window, copied the SQL, added the ORDER BY clause and ran it. Result zero lines. Removed the ORDER BY clause and tried again still nothing. Altered the derived table from X to T and it works. Roy Lambert |
Mon, May 10 2010 1:22 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Leaving that one I opened another query window, copied the SQL, added the ORDER BY clause and ran it. Result zero lines. Removed the ORDER BY clause and tried again still nothing. Altered the derived table from X to T and it works. >> I'll check it out. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |